Last active
April 24, 2016 15:56
-
-
Save meh/9066b0488c7bd5ed578c3a53ea1b651c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur ffmpeg-2.8.3/libavcodec/avcodec.h ffmpeg-3.0.1/libavcodec/avcodec.h | |
--- ffmpeg-2.8.3/libavcodec/avcodec.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/avcodec.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -93,8 +93,7 @@ | |
* | |
* If you add a codec ID to this list, add it so that | |
* 1. no value of a existing codec ID changes (that would break ABI), | |
- * 2. Give it a value which when taken as ASCII is recognized uniquely by a human as this specific codec. | |
- * This ensures that 2 forks can independently add AVCodecIDs without producing conflicts. | |
+ * 2. it is as close as possible to similar codecs | |
* | |
* After adding new codec IDs, do not forget to add an entry to the codec | |
* descriptor list and bump libavcodec minor version. | |
@@ -242,7 +241,7 @@ | |
AV_CODEC_ID_ANM, | |
AV_CODEC_ID_BINKVIDEO, | |
AV_CODEC_ID_IFF_ILBM, | |
- AV_CODEC_ID_IFF_BYTERUN1, | |
+#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM | |
AV_CODEC_ID_KGV1, | |
AV_CODEC_ID_YOP, | |
AV_CODEC_ID_VP8, | |
@@ -275,56 +274,48 @@ | |
AV_CODEC_ID_MSS2, | |
AV_CODEC_ID_VP9, | |
AV_CODEC_ID_AIC, | |
- AV_CODEC_ID_ESCAPE130_DEPRECATED, | |
- AV_CODEC_ID_G2M_DEPRECATED, | |
- AV_CODEC_ID_WEBP_DEPRECATED, | |
+ AV_CODEC_ID_ESCAPE130, | |
+ AV_CODEC_ID_G2M, | |
+ AV_CODEC_ID_WEBP, | |
AV_CODEC_ID_HNM4_VIDEO, | |
- AV_CODEC_ID_HEVC_DEPRECATED, | |
+ AV_CODEC_ID_HEVC, | |
+#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC | |
AV_CODEC_ID_FIC, | |
AV_CODEC_ID_ALIAS_PIX, | |
- AV_CODEC_ID_BRENDER_PIX_DEPRECATED, | |
- AV_CODEC_ID_PAF_VIDEO_DEPRECATED, | |
- AV_CODEC_ID_EXR_DEPRECATED, | |
- AV_CODEC_ID_VP7_DEPRECATED, | |
- AV_CODEC_ID_SANM_DEPRECATED, | |
- AV_CODEC_ID_SGIRLE_DEPRECATED, | |
- AV_CODEC_ID_MVC1_DEPRECATED, | |
- AV_CODEC_ID_MVC2_DEPRECATED, | |
+ AV_CODEC_ID_BRENDER_PIX, | |
+ AV_CODEC_ID_PAF_VIDEO, | |
+ AV_CODEC_ID_EXR, | |
+ AV_CODEC_ID_VP7, | |
+ AV_CODEC_ID_SANM, | |
+ AV_CODEC_ID_SGIRLE, | |
+ AV_CODEC_ID_MVC1, | |
+ AV_CODEC_ID_MVC2, | |
AV_CODEC_ID_HQX, | |
AV_CODEC_ID_TDSC, | |
AV_CODEC_ID_HQ_HQA, | |
AV_CODEC_ID_HAP, | |
AV_CODEC_ID_DDS, | |
- | |
- AV_CODEC_ID_BRENDER_PIX= MKBETAG('B','P','I','X'), | |
- AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'), | |
- AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'), | |
- AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'), | |
- AV_CODEC_ID_AVRP = MKBETAG('A','V','R','P'), | |
- | |
- AV_CODEC_ID_012V = MKBETAG('0','1','2','V'), | |
- AV_CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'), | |
- AV_CODEC_ID_AVUI = MKBETAG('A','V','U','I'), | |
- AV_CODEC_ID_AYUV = MKBETAG('A','Y','U','V'), | |
- AV_CODEC_ID_TARGA_Y216 = MKBETAG('T','2','1','6'), | |
- AV_CODEC_ID_V308 = MKBETAG('V','3','0','8'), | |
- AV_CODEC_ID_V408 = MKBETAG('V','4','0','8'), | |
- AV_CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'), | |
- AV_CODEC_ID_SANM = MKBETAG('S','A','N','M'), | |
- AV_CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'), | |
- AV_CODEC_ID_AVRN = MKBETAG('A','V','R','n'), | |
- AV_CODEC_ID_CPIA = MKBETAG('C','P','I','A'), | |
- AV_CODEC_ID_XFACE = MKBETAG('X','F','A','C'), | |
- AV_CODEC_ID_SGIRLE = MKBETAG('S','G','I','R'), | |
- AV_CODEC_ID_MVC1 = MKBETAG('M','V','C','1'), | |
- AV_CODEC_ID_MVC2 = MKBETAG('M','V','C','2'), | |
- AV_CODEC_ID_SNOW = MKBETAG('S','N','O','W'), | |
- AV_CODEC_ID_WEBP = MKBETAG('W','E','B','P'), | |
- AV_CODEC_ID_SMVJPEG = MKBETAG('S','M','V','J'), | |
- AV_CODEC_ID_HEVC = MKBETAG('H','2','6','5'), | |
-#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC | |
- AV_CODEC_ID_VP7 = MKBETAG('V','P','7','0'), | |
- AV_CODEC_ID_APNG = MKBETAG('A','P','N','G'), | |
+ AV_CODEC_ID_DXV, | |
+ AV_CODEC_ID_SCREENPRESSO, | |
+ AV_CODEC_ID_RSCC, | |
+ | |
+ AV_CODEC_ID_Y41P = 0x8000, | |
+ AV_CODEC_ID_AVRP, | |
+ AV_CODEC_ID_012V, | |
+ AV_CODEC_ID_AVUI, | |
+ AV_CODEC_ID_AYUV, | |
+ AV_CODEC_ID_TARGA_Y216, | |
+ AV_CODEC_ID_V308, | |
+ AV_CODEC_ID_V408, | |
+ AV_CODEC_ID_YUV4, | |
+ AV_CODEC_ID_AVRN, | |
+ AV_CODEC_ID_CPIA, | |
+ AV_CODEC_ID_XFACE, | |
+ AV_CODEC_ID_SNOW, | |
+ AV_CODEC_ID_SMVJPEG, | |
+ AV_CODEC_ID_APNG, | |
+ AV_CODEC_ID_DAALA, | |
+ AV_CODEC_ID_CFHD, | |
/* various PCM "codecs" */ | |
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs | |
@@ -356,12 +347,12 @@ | |
AV_CODEC_ID_PCM_LXF, | |
AV_CODEC_ID_S302M, | |
AV_CODEC_ID_PCM_S8_PLANAR, | |
- AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED, | |
- AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED, | |
- AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED, | |
- AV_CODEC_ID_PCM_S24LE_PLANAR = MKBETAG(24,'P','S','P'), | |
- AV_CODEC_ID_PCM_S32LE_PLANAR = MKBETAG(32,'P','S','P'), | |
- AV_CODEC_ID_PCM_S16BE_PLANAR = MKBETAG('P','S','P',16), | |
+ AV_CODEC_ID_PCM_S24LE_PLANAR, | |
+ AV_CODEC_ID_PCM_S32LE_PLANAR, | |
+ AV_CODEC_ID_PCM_S16BE_PLANAR, | |
+ /* new PCM "codecs" should be added right below this line starting with | |
+ * an explicit value of for example 0x10800 | |
+ */ | |
/* various ADPCM codecs */ | |
AV_CODEC_ID_ADPCM_IMA_QT = 0x11000, | |
@@ -394,17 +385,19 @@ | |
AV_CODEC_ID_ADPCM_IMA_ISS, | |
AV_CODEC_ID_ADPCM_G722, | |
AV_CODEC_ID_ADPCM_IMA_APC, | |
- AV_CODEC_ID_ADPCM_VIMA_DEPRECATED, | |
- AV_CODEC_ID_ADPCM_VIMA = MKBETAG('V','I','M','A'), | |
+ AV_CODEC_ID_ADPCM_VIMA, | |
#if FF_API_VIMA_DECODER | |
- AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'), | |
+ AV_CODEC_ID_VIMA = AV_CODEC_ID_ADPCM_VIMA, | |
#endif | |
- AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '), | |
- AV_CODEC_ID_ADPCM_IMA_OKI = MKBETAG('O','K','I',' '), | |
- AV_CODEC_ID_ADPCM_DTK = MKBETAG('D','T','K',' '), | |
- AV_CODEC_ID_ADPCM_IMA_RAD = MKBETAG('R','A','D',' '), | |
- AV_CODEC_ID_ADPCM_G726LE = MKBETAG('6','2','7','G'), | |
- AV_CODEC_ID_ADPCM_THP_LE = MKBETAG('T','H','P','L'), | |
+ | |
+ AV_CODEC_ID_ADPCM_AFC = 0x11800, | |
+ AV_CODEC_ID_ADPCM_IMA_OKI, | |
+ AV_CODEC_ID_ADPCM_DTK, | |
+ AV_CODEC_ID_ADPCM_IMA_RAD, | |
+ AV_CODEC_ID_ADPCM_G726LE, | |
+ AV_CODEC_ID_ADPCM_THP_LE, | |
+ AV_CODEC_ID_ADPCM_PSX, | |
+ AV_CODEC_ID_ADPCM_AICA, | |
/* AMR */ | |
AV_CODEC_ID_AMR_NB = 0x12000, | |
@@ -420,6 +413,8 @@ | |
AV_CODEC_ID_XAN_DPCM, | |
AV_CODEC_ID_SOL_DPCM, | |
+ AV_CODEC_ID_SDX2_DPCM = 0x14800, | |
+ | |
/* audio codecs */ | |
AV_CODEC_ID_MP2 = 0x15000, | |
AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 | |
@@ -484,26 +479,27 @@ | |
AV_CODEC_ID_RALF, | |
AV_CODEC_ID_IAC, | |
AV_CODEC_ID_ILBC, | |
- AV_CODEC_ID_OPUS_DEPRECATED, | |
+ AV_CODEC_ID_OPUS, | |
AV_CODEC_ID_COMFORT_NOISE, | |
- AV_CODEC_ID_TAK_DEPRECATED, | |
+ AV_CODEC_ID_TAK, | |
AV_CODEC_ID_METASOUND, | |
- AV_CODEC_ID_PAF_AUDIO_DEPRECATED, | |
+ AV_CODEC_ID_PAF_AUDIO, | |
AV_CODEC_ID_ON2AVC, | |
AV_CODEC_ID_DSS_SP, | |
- AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'), | |
- AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'), | |
- AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'), | |
- AV_CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'), | |
- AV_CODEC_ID_OPUS = MKBETAG('O','P','U','S'), | |
- AV_CODEC_ID_TAK = MKBETAG('t','B','a','K'), | |
- AV_CODEC_ID_EVRC = MKBETAG('s','e','v','c'), | |
- AV_CODEC_ID_SMV = MKBETAG('s','s','m','v'), | |
- AV_CODEC_ID_DSD_LSBF = MKBETAG('D','S','D','L'), | |
- AV_CODEC_ID_DSD_MSBF = MKBETAG('D','S','D','M'), | |
- AV_CODEC_ID_DSD_LSBF_PLANAR = MKBETAG('D','S','D','1'), | |
- AV_CODEC_ID_DSD_MSBF_PLANAR = MKBETAG('D','S','D','8'), | |
- AV_CODEC_ID_4GV = MKBETAG('s','4','g','v'), | |
+ | |
+ AV_CODEC_ID_FFWAVESYNTH = 0x15800, | |
+ AV_CODEC_ID_SONIC, | |
+ AV_CODEC_ID_SONIC_LS, | |
+ AV_CODEC_ID_EVRC, | |
+ AV_CODEC_ID_SMV, | |
+ AV_CODEC_ID_DSD_LSBF, | |
+ AV_CODEC_ID_DSD_MSBF, | |
+ AV_CODEC_ID_DSD_LSBF_PLANAR, | |
+ AV_CODEC_ID_DSD_MSBF_PLANAR, | |
+ AV_CODEC_ID_4GV, | |
+ AV_CODEC_ID_INTERPLAY_ACM, | |
+ AV_CODEC_ID_XMA1, | |
+ AV_CODEC_ID_XMA2, | |
/* subtitle codecs */ | |
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. | |
@@ -516,33 +512,35 @@ | |
AV_CODEC_ID_HDMV_PGS_SUBTITLE, | |
AV_CODEC_ID_DVB_TELETEXT, | |
AV_CODEC_ID_SRT, | |
- AV_CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'), | |
- AV_CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'), | |
- AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'), | |
- AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'), | |
- AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'), | |
- AV_CODEC_ID_STL = MKBETAG('S','p','T','L'), | |
- AV_CODEC_ID_SUBVIEWER1 = MKBETAG('S','b','V','1'), | |
- AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'), | |
- AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'), | |
- AV_CODEC_ID_WEBVTT = MKBETAG('W','V','T','T'), | |
- AV_CODEC_ID_MPL2 = MKBETAG('M','P','L','2'), | |
- AV_CODEC_ID_VPLAYER = MKBETAG('V','P','l','r'), | |
- AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'), | |
- AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska | |
- AV_CODEC_ID_HDMV_TEXT_SUBTITLE = MKBETAG('B','D','T','X'), | |
+ | |
+ AV_CODEC_ID_MICRODVD = 0x17800, | |
+ AV_CODEC_ID_EIA_608, | |
+ AV_CODEC_ID_JACOSUB, | |
+ AV_CODEC_ID_SAMI, | |
+ AV_CODEC_ID_REALTEXT, | |
+ AV_CODEC_ID_STL, | |
+ AV_CODEC_ID_SUBVIEWER1, | |
+ AV_CODEC_ID_SUBVIEWER, | |
+ AV_CODEC_ID_SUBRIP, | |
+ AV_CODEC_ID_WEBVTT, | |
+ AV_CODEC_ID_MPL2, | |
+ AV_CODEC_ID_VPLAYER, | |
+ AV_CODEC_ID_PJS, | |
+ AV_CODEC_ID_ASS, | |
+ AV_CODEC_ID_HDMV_TEXT_SUBTITLE, | |
/* other specific kind of codecs (generally used for attachments) */ | |
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. | |
AV_CODEC_ID_TTF = 0x18000, | |
- AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'), | |
- AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'), | |
- AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'), | |
- AV_CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'), | |
- AV_CODEC_ID_SMPTE_KLV = MKBETAG('K','L','V','A'), | |
- AV_CODEC_ID_DVD_NAV = MKBETAG('D','N','A','V'), | |
- AV_CODEC_ID_TIMED_ID3 = MKBETAG('T','I','D','3'), | |
- AV_CODEC_ID_BIN_DATA = MKBETAG('D','A','T','A'), | |
+ | |
+ AV_CODEC_ID_BINTEXT = 0x18800, | |
+ AV_CODEC_ID_XBIN, | |
+ AV_CODEC_ID_IDF, | |
+ AV_CODEC_ID_OTF, | |
+ AV_CODEC_ID_SMPTE_KLV, | |
+ AV_CODEC_ID_DVD_NAV, | |
+ AV_CODEC_ID_TIMED_ID3, | |
+ AV_CODEC_ID_BIN_DATA, | |
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it | |
@@ -552,10 +550,7 @@ | |
AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems | |
* stream (only used by libavformat) */ | |
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information. | |
- | |
-#if FF_API_CODEC_ID | |
-#include "old_codec_ids.h" | |
-#endif | |
+ AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket | |
}; | |
/** | |
@@ -580,13 +575,17 @@ | |
* Codec properties, a combination of AV_CODEC_PROP_* flags. | |
*/ | |
int props; | |
- | |
/** | |
* MIME type(s) associated with the codec. | |
* May be NULL; if not, a NULL-terminated array of MIME types. | |
* The first item is always non-NULL and is the preferred MIME type. | |
*/ | |
const char *const *mime_types; | |
+ /** | |
+ * If non-NULL, an array of profiles recognized for this codec. | |
+ * Terminated with FF_PROFILE_UNKNOWN. | |
+ */ | |
+ const struct AVProfile *profiles; | |
} AVCodecDescriptor; | |
/** | |
@@ -795,11 +794,11 @@ | |
* interlaced motion estimation | |
*/ | |
#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29) | |
+#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31) | |
+ | |
/** | |
* Allow non spec compliant speedup tricks. | |
*/ | |
-#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31) | |
- | |
#define AV_CODEC_FLAG2_FAST (1 << 0) | |
/** | |
* Skip bitstream encoding. | |
@@ -1191,6 +1190,44 @@ | |
int16_t position[3][2]; | |
}AVPanScan; | |
+/** | |
+ * This structure describes the bitrate properties of an encoded bitstream. It | |
+ * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD | |
+ * parameters for H.264/HEVC. | |
+ */ | |
+typedef struct AVCPBProperties { | |
+ /** | |
+ * Maximum bitrate of the stream, in bits per second. | |
+ * Zero if unknown or unspecified. | |
+ */ | |
+ int max_bitrate; | |
+ /** | |
+ * Minimum bitrate of the stream, in bits per second. | |
+ * Zero if unknown or unspecified. | |
+ */ | |
+ int min_bitrate; | |
+ /** | |
+ * Average bitrate of the stream, in bits per second. | |
+ * Zero if unknown or unspecified. | |
+ */ | |
+ int avg_bitrate; | |
+ | |
+ /** | |
+ * The size of the buffer to which the ratecontrol is applied, in bits. | |
+ * Zero if unknown or unspecified. | |
+ */ | |
+ int buffer_size; | |
+ | |
+ /** | |
+ * The delay between the time the packet this structure is associated with | |
+ * is received and the time when it should be decoded, in periods of a 27MHz | |
+ * clock. | |
+ * | |
+ * UINT64_MAX when unknown or unspecified. | |
+ */ | |
+ uint64_t vbv_delay; | |
+} AVCPBProperties; | |
+ | |
#if FF_API_QSCALE_TYPE | |
#define FF_QSCALE_TYPE_MPEG1 0 | |
#define FF_QSCALE_TYPE_MPEG2 1 | |
@@ -1198,18 +1235,6 @@ | |
#define FF_QSCALE_TYPE_VP56 3 | |
#endif | |
-#if FF_API_GET_BUFFER | |
-#define FF_BUFFER_TYPE_INTERNAL 1 | |
-#define FF_BUFFER_TYPE_USER 2 ///< direct rendering buffers (image is (de)allocated by user) | |
-#define FF_BUFFER_TYPE_SHARED 4 ///< Buffer from somewhere else; don't deallocate image (data/base), all other tables are not shared. | |
-#define FF_BUFFER_TYPE_COPY 8 ///< Just a (modified) copy of some other buffer, don't deallocate anything. | |
- | |
-#define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore). | |
-#define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer. | |
-#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content. | |
-#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update). | |
-#endif | |
- | |
/** | |
* The decoder will keep a reference to the frame and may reuse it later. | |
*/ | |
@@ -1303,6 +1328,19 @@ | |
AV_PKT_DATA_QUALITY_STATS, | |
/** | |
+ * This side data contains an integer value representing the stream index | |
+ * of a "fallback" track. A fallback track indicates an alternate | |
+ * track to use when the current track can not be decoded for some reason. | |
+ * e.g. no decoder available for codec. | |
+ */ | |
+ AV_PKT_DATA_FALLBACK_TRACK, | |
+ | |
+ /** | |
+ * This side data corresponds to the AVCPBProperties struct. | |
+ */ | |
+ AV_PKT_DATA_CPB_PROPERTIES, | |
+ | |
+ /** | |
* Recommmends skipping the specified number of samples | |
* @code | |
* u32le number of samples to skip from start of this packet | |
@@ -1381,21 +1419,27 @@ | |
* then passed to muxers. | |
* | |
* For video, it should typically contain one compressed frame. For audio it may | |
- * contain several compressed frames. | |
+ * contain several compressed frames. Encoders are allowed to output empty | |
+ * packets, with no compressed data, containing only side data | |
+ * (e.g. to update some stream parameters at the end of encoding). | |
* | |
* AVPacket is one of the few structs in FFmpeg, whose size is a part of public | |
* ABI. Thus it may be allocated on stack and no new fields can be added to it | |
* without libavcodec and libavformat major bump. | |
* | |
- * The semantics of data ownership depends on the buf or destruct (deprecated) | |
- * fields. If either is set, the packet data is dynamically allocated and is | |
- * valid indefinitely until av_free_packet() is called (which in turn calls | |
- * av_buffer_unref()/the destruct callback to free the data). If neither is set, | |
- * the packet data is typically backed by some static buffer somewhere and is | |
- * only valid for a limited time (e.g. until the next read call when demuxing). | |
+ * The semantics of data ownership depends on the buf field. | |
+ * If it is set, the packet data is dynamically allocated and is | |
+ * valid indefinitely until a call to av_packet_unref() reduces the | |
+ * reference count to 0. | |
* | |
- * The side data is always allocated with av_malloc() and is freed in | |
- * av_free_packet(). | |
+ * If the buf field is not set av_packet_ref() would make a copy instead | |
+ * of increasing the reference count. | |
+ * | |
+ * The side data is always allocated with av_malloc(), copied by | |
+ * av_packet_ref() and freed by av_packet_unref(). | |
+ * | |
+ * @see av_packet_ref | |
+ * @see av_packet_unref | |
*/ | |
typedef struct AVPacket { | |
/** | |
@@ -1438,33 +1482,19 @@ | |
* Duration of this packet in AVStream->time_base units, 0 if unknown. | |
* Equals next_pts - this_pts in presentation order. | |
*/ | |
- int duration; | |
-#if FF_API_DESTRUCT_PACKET | |
- attribute_deprecated | |
- void (*destruct)(struct AVPacket *); | |
- attribute_deprecated | |
- void *priv; | |
-#endif | |
+ int64_t duration; | |
+ | |
int64_t pos; ///< byte position in stream, -1 if unknown | |
+#if FF_API_CONVERGENCE_DURATION | |
/** | |
- * Time difference in AVStream->time_base units from the pts of this | |
- * packet to the point at which the output from the decoder has converged | |
- * independent from the availability of previous frames. That is, the | |
- * frames are virtually identical no matter if decoding started from | |
- * the very first frame or from this keyframe. | |
- * Is AV_NOPTS_VALUE if unknown. | |
- * This field is not the display duration of the current packet. | |
- * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY | |
- * set. | |
- * | |
- * The purpose of this field is to allow seeking in streams that have no | |
- * keyframes in the conventional sense. It corresponds to the | |
- * recovery point SEI in H.264 and match_time_delta in NUT. It is also | |
- * essential for some types of subtitle streams to ensure that all | |
- * subtitles are correctly displayed after seeking. | |
+ * @deprecated Same as the duration field, but as int64_t. This was required | |
+ * for Matroska subtitles, whose duration values could overflow when the | |
+ * duration field was still an int. | |
*/ | |
+ attribute_deprecated | |
int64_t convergence_duration; | |
+#endif | |
} AVPacket; | |
#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe | |
#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted | |
@@ -1564,7 +1594,7 @@ | |
* - decoding: Set by user, may be overwritten by libavcodec | |
* if this info is available in the stream | |
*/ | |
- int bit_rate; | |
+ int64_t bit_rate; | |
/** | |
* number of bits the bitstream is allowed to diverge from the reference. | |
@@ -1794,7 +1824,11 @@ | |
#define FF_RC_STRATEGY_XVID 1 | |
#endif | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int b_frame_strategy; | |
+#endif | |
/** | |
* qscale offset between IP and B-frames | |
@@ -1811,12 +1845,11 @@ | |
*/ | |
int has_b_frames; | |
- /** | |
- * 0-> h263 quant 1-> mpeg quant | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int mpeg_quant; | |
+#endif | |
/** | |
* qscale factor between P and I-frames | |
@@ -1875,15 +1908,15 @@ | |
* - decoding: Set by user (or 0). | |
*/ | |
int slice_count; | |
- /** | |
- * prediction method (needed for huffyuv) | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int prediction_method; | |
#define FF_PRED_LEFT 0 | |
#define FF_PRED_PLANE 1 | |
#define FF_PRED_MEDIAN 2 | |
+#endif | |
/** | |
* slice offsets in the frame in bytes | |
@@ -1956,12 +1989,11 @@ | |
*/ | |
int last_predictor_count; | |
- /** | |
- * prepass for motion estimation | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int pre_me; | |
+#endif | |
/** | |
* motion estimation prepass comparison function | |
@@ -2070,20 +2102,15 @@ | |
*/ | |
uint16_t *inter_matrix; | |
- /** | |
- * scene change detection threshold | |
- * 0 is default, larger means fewer detected scene changes. | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int scenechange_threshold; | |
- /** | |
- * noise reduction strength | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int noise_reduction; | |
+#endif | |
#if FF_API_MPV_OPT | |
/** | |
@@ -2142,12 +2169,13 @@ | |
*/ | |
int mb_lmax; | |
+#if FF_API_PRIVATE_OPT | |
/** | |
- * | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
+ * @deprecated use encoder private options instead | |
*/ | |
+ attribute_deprecated | |
int me_penalty_compensation; | |
+#endif | |
/** | |
* | |
@@ -2156,12 +2184,11 @@ | |
*/ | |
int bidir_refine; | |
- /** | |
- * | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int brd_scale; | |
+#endif | |
/** | |
* minimum GOP size | |
@@ -2177,12 +2204,11 @@ | |
*/ | |
int refs; | |
- /** | |
- * chroma qp offset from luma | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int chromaoffset; | |
+#endif | |
#if FF_API_UNUSED_MEMBERS | |
/** | |
@@ -2201,12 +2227,11 @@ | |
*/ | |
int mv0_threshold; | |
- /** | |
- * Adjust sensitivity of b_frame_strategy 1. | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int b_sensitivity; | |
+#endif | |
/** | |
* Chromaticity coordinates of the source primaries. | |
@@ -2305,16 +2330,6 @@ | |
*/ | |
int cutoff; | |
-#if FF_API_REQUEST_CHANNELS | |
- /** | |
- * Decoder should decode to this many channels if it can (0 for default) | |
- * - encoding: unused | |
- * - decoding: Set by user. | |
- * @deprecated Deprecated in favor of request_channel_layout. | |
- */ | |
- attribute_deprecated int request_channels; | |
-#endif | |
- | |
/** | |
* Audio channel layout. | |
* - encoding: set by user. | |
@@ -2344,102 +2359,6 @@ | |
*/ | |
enum AVSampleFormat request_sample_fmt; | |
-#if FF_API_GET_BUFFER | |
- /** | |
- * Called at the beginning of each frame to get a buffer for it. | |
- * | |
- * The function will set AVFrame.data[], AVFrame.linesize[]. | |
- * AVFrame.extended_data[] must also be set, but it should be the same as | |
- * AVFrame.data[] except for planar audio with more channels than can fit | |
- * in AVFrame.data[]. In that case, AVFrame.data[] shall still contain as | |
- * many data pointers as it can hold. | |
- * | |
- * 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. | |
- * | |
- * AVFrame.data[] should be 32- or 16-byte-aligned unless the CPU doesn't | |
- * need it. avcodec_default_get_buffer() aligns the output buffer properly, | |
- * but if get_buffer() is overridden then alignment considerations should | |
- * be taken into account. | |
- * | |
- * @see avcodec_default_get_buffer() | |
- * | |
- * Video: | |
- * | |
- * If pic.reference is set then the frame will be read later by libavcodec. | |
- * avcodec_align_dimensions2() should be used to find the required width and | |
- * height, as they normally need to be rounded up to the next multiple of 16. | |
- * | |
- * 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. | |
- * | |
- * @see release_buffer(), reget_buffer() | |
- * @see avcodec_align_dimensions2() | |
- * | |
- * Audio: | |
- * | |
- * Decoders request a buffer of a particular size by setting | |
- * AVFrame.nb_samples prior to calling get_buffer(). The decoder may, | |
- * however, utilize only part of the buffer by setting AVFrame.nb_samples | |
- * to a smaller value in the output frame. | |
- * | |
- * Decoders cannot use the buffer after returning from | |
- * avcodec_decode_audio4(), so they will not call release_buffer(), as it | |
- * is assumed to be released immediately upon return. In some rare cases, | |
- * a decoder may need to call get_buffer() more than once in a single | |
- * call to avcodec_decode_audio4(). In that case, when get_buffer() is | |
- * called again after it has already been called once, the previously | |
- * acquired buffer is assumed to be released at that time and may not be | |
- * reused by the decoder. | |
- * | |
- * As a convenience, av_samples_get_buffer_size() and | |
- * av_samples_fill_arrays() in libavutil may be used by custom get_buffer() | |
- * functions to find the required data size and to fill data pointers and | |
- * linesize. In AVFrame.linesize, only linesize[0] may be set for audio | |
- * since all planes must be the same size. | |
- * | |
- * @see av_samples_get_buffer_size(), av_samples_fill_arrays() | |
- * | |
- * - encoding: unused | |
- * - decoding: Set by libavcodec, user can override. | |
- * | |
- * @deprecated use get_buffer2() | |
- */ | |
- attribute_deprecated | |
- int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); | |
- | |
- /** | |
- * 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. | |
- * | |
- * @deprecated custom freeing callbacks should be set from get_buffer2() | |
- */ | |
- attribute_deprecated | |
- void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic); | |
- | |
- /** | |
- * Called at the beginning of a frame to get cr buffer for it. | |
- * Buffer type (size, hints) must be the same. libavcodec won't check it. | |
- * libavcodec will pass previous buffer in pic, function should return | |
- * same buffer or new buffer with old frame "painted" into it. | |
- * If pic.data[0] == NULL must behave like get_buffer(). | |
- * if CODEC_CAP_DR1 is not set then reget_buffer() must call | |
- * avcodec_default_reget_buffer() instead of providing buffers allocated by | |
- * some other means. | |
- * - encoding: unused | |
- * - decoding: Set by libavcodec, user can override. | |
- */ | |
- attribute_deprecated | |
- int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic); | |
-#endif | |
- | |
/** | |
* This callback is called at the beginning of each frame to get data | |
* buffer(s) for it. There may be one contiguous buffer for all the data or | |
@@ -2601,14 +2520,14 @@ | |
* - encoding: Set by user. | |
* - decoding: Set by user, may be overwritten by libavcodec. | |
*/ | |
- int rc_max_rate; | |
+ int64_t rc_max_rate; | |
/** | |
* minimum bitrate | |
* - encoding: Set by user. | |
* - decoding: unused | |
*/ | |
- int rc_min_rate; | |
+ int64_t rc_min_rate; | |
#if FF_API_MPV_OPT | |
/** | |
@@ -2642,6 +2561,7 @@ | |
*/ | |
int rc_initial_buffer_occupancy; | |
+#if FF_API_CODER_TYPE | |
#define FF_CODER_TYPE_VLC 0 | |
#define FF_CODER_TYPE_AC 1 | |
#define FF_CODER_TYPE_RAW 2 | |
@@ -2650,18 +2570,17 @@ | |
#define FF_CODER_TYPE_DEFLATE 4 | |
#endif /* FF_API_UNUSED_MEMBERS */ | |
/** | |
- * coder type | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
+ * @deprecated use encoder private options instead | |
*/ | |
+ attribute_deprecated | |
int coder_type; | |
+#endif /* FF_API_CODER_TYPE */ | |
- /** | |
- * context model | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int context_model; | |
+#endif | |
#if FF_API_MPV_OPT | |
/** | |
@@ -2677,33 +2596,23 @@ | |
int lmax; | |
#endif | |
- /** | |
- * frame skip threshold | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int frame_skip_threshold; | |
- /** | |
- * frame skip factor | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int frame_skip_factor; | |
- /** | |
- * frame skip exponent | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int frame_skip_exp; | |
- /** | |
- * frame skip comparison function | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int frame_skip_cmp; | |
+#endif /* FF_API_PRIVATE_OPT */ | |
/** | |
* trellis RD quantization | |
@@ -2712,56 +2621,68 @@ | |
*/ | |
int trellis; | |
- /** | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int min_prediction_order; | |
- /** | |
- * - encoding: Set by user. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int max_prediction_order; | |
- /** | |
- * GOP timecode frame start number | |
- * - encoding: Set by user, in non drop frame format | |
- * - decoding: Set by libavcodec (timecode in the 25 bits format, -1 if unset) | |
- */ | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int64_t timecode_frame_start; | |
+#endif | |
+#if FF_API_RTP_CALLBACK | |
+ /** | |
+ * @deprecated unused | |
+ */ | |
/* The RTP callback: This function is called */ | |
/* every time the encoder has a packet to send. */ | |
/* It depends on the encoder if the data starts */ | |
/* with a Start Code (it should). H.263 does. */ | |
/* mb_nb contains the number of macroblocks */ | |
/* encoded in the RTP payload. */ | |
+ attribute_deprecated | |
void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); | |
+#endif | |
+#if FF_API_PRIVATE_OPT | |
+ /** @deprecated use encoder private options instead */ | |
+ attribute_deprecated | |
int rtp_payload_size; /* The size of the RTP payload: the coder will */ | |
/* do its best to deliver a chunk with size */ | |
/* below rtp_payload_size, the chunk will start */ | |
/* with a start code on some codecs like H.263. */ | |
/* This doesn't take account of any particular */ | |
/* headers inside the transmitted RTP payload. */ | |
+#endif | |
+#if FF_API_STAT_BITS | |
/* statistics, used for 2-pass encoding */ | |
+ attribute_deprecated | |
int mv_bits; | |
+ attribute_deprecated | |
int header_bits; | |
+ attribute_deprecated | |
int i_tex_bits; | |
+ attribute_deprecated | |
int p_tex_bits; | |
+ attribute_deprecated | |
int i_count; | |
+ attribute_deprecated | |
int p_count; | |
+ attribute_deprecated | |
int skip_count; | |
+ attribute_deprecated | |
int misc_bits; | |
- /** | |
- * number of bits used for the previously encoded frame | |
- * - encoding: Set by libavcodec. | |
- * - decoding: unused | |
- */ | |
+ /** @deprecated this field is unused */ | |
+ attribute_deprecated | |
int frame_bits; | |
+#endif | |
/** | |
* pass1 encoding statistics output buffer | |
@@ -3092,14 +3013,6 @@ | |
*/ | |
int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count); | |
-#if FF_API_THREAD_OPAQUE | |
- /** | |
- * @deprecated this field should not be used from outside of lavc | |
- */ | |
- attribute_deprecated | |
- void *thread_opaque; | |
-#endif | |
- | |
/** | |
* noise vs. sse weight for the nsse comparison function | |
* - encoding: Set by user. | |
@@ -3245,36 +3158,33 @@ | |
int error_rate; | |
#endif | |
-#if FF_API_CODEC_PKT | |
- /** | |
- * @deprecated this field is not supposed to be accessed from outside lavc | |
- */ | |
- attribute_deprecated | |
- AVPacket *pkt; | |
-#endif | |
- | |
+#if FF_API_VBV_DELAY | |
/** | |
* VBV delay coded in the last frame (in periods of a 27 MHz clock). | |
* Used for compliant TS muxing. | |
* - encoding: Set by libavcodec. | |
* - decoding: unused. | |
+ * @deprecated this value is now exported as a part of | |
+ * AV_PKT_DATA_CPB_PROPERTIES packet side data | |
*/ | |
+ attribute_deprecated | |
uint64_t vbv_delay; | |
+#endif | |
+#if FF_API_SIDEDATA_ONLY_PKT | |
/** | |
- * Encoding only. Allow encoders to output packets that do not contain any | |
- * encoded data, only side data. | |
+ * Encoding only and set by default. Allow encoders to output packets | |
+ * that do not contain any encoded data, only side data. | |
* | |
* Some encoders need to output such packets, e.g. to update some stream | |
* parameters at the end of encoding. | |
* | |
- * All callers are strongly recommended to set this option to 1 and update | |
- * their code to deal with such packets, since this behaviour may become | |
- * always enabled in the future (then this option will be deprecated and | |
- * later removed). To avoid ABI issues when this happens, the callers should | |
- * use AVOptions to set this field. | |
+ * @deprecated this field disables the default behaviour and | |
+ * it is kept only for compatibility. | |
*/ | |
+ attribute_deprecated | |
int side_data_only_packets; | |
+#endif | |
/** | |
* Audio only. The number of "priming" samples (padding) inserted by the | |
@@ -3435,6 +3345,16 @@ | |
unsigned properties; | |
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001 | |
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002 | |
+ | |
+ /** | |
+ * Additional data associated with the entire coded stream. | |
+ * | |
+ * - decoding: unused | |
+ * - encoding: may be set by libavcodec after avcodec_open2(). | |
+ */ | |
+ AVPacketSideData *coded_side_data; | |
+ int nb_coded_side_data; | |
+ | |
} AVCodecContext; | |
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); | |
@@ -3728,6 +3648,7 @@ | |
* @} | |
*/ | |
+#if FF_API_AVPICTURE | |
/** | |
* @defgroup lavc_picture AVPicture | |
* | |
@@ -3740,15 +3661,19 @@ | |
* | |
* Up to four components can be stored into it, the last component is | |
* alpha. | |
+ * @deprecated use AVFrame or imgutils functions instead | |
*/ | |
typedef struct AVPicture { | |
+ attribute_deprecated | |
uint8_t *data[AV_NUM_DATA_POINTERS]; ///< pointers to the image data planes | |
+ attribute_deprecated | |
int linesize[AV_NUM_DATA_POINTERS]; ///< number of bytes per line | |
} AVPicture; | |
/** | |
* @} | |
*/ | |
+#endif | |
enum AVSubtitleType { | |
SUBTITLE_NONE, | |
@@ -3777,11 +3702,20 @@ | |
int h; ///< height of pict, undefined when pict is not set | |
int nb_colors; ///< number of colors in pict, undefined when pict is not set | |
+#if FF_API_AVPICTURE | |
/** | |
- * data+linesize for the bitmap of this subtitle. | |
- * can be set for text/ass as well once they are rendered | |
+ * @deprecated unused | |
*/ | |
+ attribute_deprecated | |
AVPicture pict; | |
+#endif | |
+ /** | |
+ * data+linesize for the bitmap of this subtitle. | |
+ * Can be set for text/ass as well once they are rendered. | |
+ */ | |
+ uint8_t *data[4]; | |
+ int linesize[4]; | |
+ | |
enum AVSubtitleType type; | |
char *text; ///< 0 terminated plain UTF-8 text | |
@@ -3919,39 +3853,6 @@ | |
*/ | |
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src); | |
-#if FF_API_AVFRAME_LAVC | |
-/** | |
- * @deprecated use av_frame_alloc() | |
- */ | |
-attribute_deprecated | |
-AVFrame *avcodec_alloc_frame(void); | |
- | |
-/** | |
- * Set the fields of the given AVFrame to default values. | |
- * | |
- * @param frame The AVFrame of which the fields should be set to default values. | |
- * | |
- * @deprecated use av_frame_unref() | |
- */ | |
-attribute_deprecated | |
-void avcodec_get_frame_defaults(AVFrame *frame); | |
- | |
-/** | |
- * Free the frame and any dynamically allocated objects in it, | |
- * e.g. extended_data. | |
- * | |
- * @param frame frame to be freed. The pointer will be set to NULL. | |
- * | |
- * @warning this function does NOT free the data buffers themselves | |
- * (it does not know how, since they might have been allocated with | |
- * a custom get_buffer()). | |
- * | |
- * @deprecated use av_frame_free() | |
- */ | |
-attribute_deprecated | |
-void avcodec_free_frame(AVFrame **frame); | |
-#endif | |
- | |
/** | |
* Initialize the AVCodecContext to use the given AVCodec. Prior to using this | |
* function the context has to be allocated with avcodec_alloc_context3(). | |
@@ -4020,14 +3921,39 @@ | |
* @{ | |
*/ | |
-#if FF_API_DESTRUCT_PACKET | |
/** | |
- * Default packet destructor. | |
- * @deprecated use the AVBuffer API instead | |
+ * Allocate an AVPacket and set its fields to default values. The resulting | |
+ * struct must be freed using av_packet_free(). | |
+ * | |
+ * @return An AVPacket filled with default values or NULL on failure. | |
+ * | |
+ * @note this only allocates the AVPacket itself, not the data buffers. Those | |
+ * must be allocated through other means such as av_new_packet. | |
+ * | |
+ * @see av_new_packet | |
+ */ | |
+AVPacket *av_packet_alloc(void); | |
+ | |
+/** | |
+ * Create a new packet that references the same data as src. | |
+ * | |
+ * This is a shortcut for av_packet_alloc()+av_packet_ref(). | |
+ * | |
+ * @return newly created AVPacket on success, NULL on error. | |
+ * | |
+ * @see av_packet_alloc | |
+ * @see av_packet_ref | |
*/ | |
-attribute_deprecated | |
-void av_destruct_packet(AVPacket *pkt); | |
-#endif | |
+AVPacket *av_packet_clone(AVPacket *src); | |
+ | |
+/** | |
+ * Free the packet, if the packet is reference counted, it will be | |
+ * unreferenced first. | |
+ * | |
+ * @param packet packet to be freed. The pointer will be set to NULL. | |
+ * @note passing NULL is a no-op. | |
+ */ | |
+void av_packet_free(AVPacket **pkt); | |
/** | |
* Initialize optional fields of a packet with default values. | |
@@ -4080,12 +4006,15 @@ | |
*/ | |
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); | |
+#if FF_API_AVPACKET_OLD_API | |
/** | |
* @warning This is a hack - the packet memory allocation stuff is broken. The | |
* packet is allocated if it was not really allocated. | |
+ * | |
+ * @deprecated Use av_packet_ref | |
*/ | |
+attribute_deprecated | |
int av_dup_packet(AVPacket *pkt); | |
- | |
/** | |
* Copy packet, including contents | |
* | |
@@ -4103,10 +4032,13 @@ | |
/** | |
* Free a packet. | |
* | |
+ * @deprecated Use av_packet_unref | |
+ * | |
* @param pkt packet to free | |
*/ | |
+attribute_deprecated | |
void av_free_packet(AVPacket *pkt); | |
- | |
+#endif | |
/** | |
* Allocate new information of a packet. | |
* | |
@@ -4119,6 +4051,22 @@ | |
int size); | |
/** | |
+ * Wrap an existing array as a packet side data. | |
+ * | |
+ * @param pkt packet | |
+ * @param type side information type | |
+ * @param data the side data array. It must be allocated with the av_malloc() | |
+ * family of functions. The ownership of the data is transferred to | |
+ * pkt. | |
+ * @param size side information size | |
+ * @return a non-negative number on success, a negative AVERROR code on | |
+ * failure. On failure, the packet is unchanged and the data remains | |
+ * owned by the caller. | |
+ */ | |
+int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, | |
+ uint8_t *data, size_t size); | |
+ | |
+/** | |
* Shrink the already allocated side data buffer | |
* | |
* @param pkt packet | |
@@ -4263,12 +4211,6 @@ | |
*/ | |
AVCodec *avcodec_find_decoder_by_name(const char *name); | |
-#if FF_API_GET_BUFFER | |
-attribute_deprecated int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic); | |
-attribute_deprecated void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic); | |
-attribute_deprecated int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic); | |
-#endif | |
- | |
/** | |
* The default callback for AVCodecContext.get_buffer2(). It is made public so | |
* it can be called by custom get_buffer2() implementations for decoders without | |
@@ -4332,66 +4274,6 @@ | |
*/ | |
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); | |
-#if FF_API_OLD_DECODE_AUDIO | |
-/** | |
- * Wrapper function which calls avcodec_decode_audio4. | |
- * | |
- * @deprecated Use avcodec_decode_audio4 instead. | |
- * | |
- * Decode the audio frame of size avpkt->size from avpkt->data into samples. | |
- * Some decoders may support multiple frames in a single AVPacket, such | |
- * decoders would then just decode the first frame. In this case, | |
- * avcodec_decode_audio3 has to be called again with an AVPacket that contains | |
- * the remaining data in order to decode the second frame etc. | |
- * If no frame | |
- * could be outputted, frame_size_ptr is zero. Otherwise, it is the | |
- * decompressed frame size in bytes. | |
- * | |
- * @warning You must set frame_size_ptr to the allocated size of the | |
- * output buffer before calling avcodec_decode_audio3(). | |
- * | |
- * @warning The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than | |
- * the actual read bytes because some optimized bitstream readers read 32 or 64 | |
- * bits at once and could read over the end. | |
- * | |
- * @warning The end of the input buffer avpkt->data should be set to 0 to ensure that | |
- * no overreading happens for damaged MPEG streams. | |
- * | |
- * @warning You must not provide a custom get_buffer() when using | |
- * avcodec_decode_audio3(). Doing so will override it with | |
- * avcodec_default_get_buffer. Use avcodec_decode_audio4() instead, | |
- * which does allow the application to provide a custom get_buffer(). | |
- * | |
- * @note You might have to align the input buffer avpkt->data and output buffer | |
- * samples. The alignment requirements depend on the CPU: On some CPUs it isn't | |
- * necessary at all, on others it won't work at all if not aligned and on others | |
- * it will work but it will have an impact on performance. | |
- * | |
- * In practice, avpkt->data should have 4 byte alignment at minimum and | |
- * samples should be 16 byte aligned unless the CPU doesn't need it | |
- * (AltiVec and SSE do). | |
- * | |
- * @note Codecs which have the CODEC_CAP_DELAY capability set have a delay | |
- * between input and output, these need to be fed with avpkt->data=NULL, | |
- * avpkt->size=0 at the end to return the remaining frames. | |
- * | |
- * @param avctx the codec context | |
- * @param[out] samples the output buffer, sample type in avctx->sample_fmt | |
- * If the sample format is planar, each channel plane will | |
- * be the same size, with no padding between channels. | |
- * @param[in,out] frame_size_ptr the output buffer size in bytes | |
- * @param[in] avpkt The input AVPacket containing the input buffer. | |
- * You can create such packet with av_init_packet() and by then setting | |
- * data and size, some decoders might in addition need other fields. | |
- * All decoders are designed to use the least fields possible though. | |
- * @return On error a negative value is returned, otherwise the number of bytes | |
- * used or zero if no frame data was decompressed (used) from the input AVPacket. | |
- */ | |
-attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, | |
- int *frame_size_ptr, | |
- AVPacket *avpkt); | |
-#endif | |
- | |
/** | |
* Decode the audio frame of size avpkt->size from avpkt->data into frame. | |
* | |
@@ -4587,24 +4469,13 @@ | |
*/ | |
int key_frame; | |
+#if FF_API_CONVERGENCE_DURATION | |
/** | |
- * Time difference in stream time base units from the pts of this | |
- * packet to the point at which the output from the decoder has converged | |
- * independent from the availability of previous frames. That is, the | |
- * frames are virtually identical no matter if decoding started from | |
- * the very first frame or from this keyframe. | |
- * Is AV_NOPTS_VALUE if unknown. | |
- * This field is not the display duration of the current frame. | |
- * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY | |
- * set. | |
- * | |
- * The purpose of this field is to allow seeking in streams that have no | |
- * keyframes in the conventional sense. It corresponds to the | |
- * recovery point SEI in H.264 and match_time_delta in NUT. It is also | |
- * essential for some types of subtitle streams to ensure that all | |
- * subtitles are correctly displayed after seeking. | |
+ * @deprecated unused | |
*/ | |
+ attribute_deprecated | |
int64_t convergence_duration; | |
+#endif | |
// Timestamp generation support: | |
/** | |
@@ -4805,36 +4676,6 @@ | |
*/ | |
AVCodec *avcodec_find_encoder_by_name(const char *name); | |
-#if FF_API_OLD_ENCODE_AUDIO | |
-/** | |
- * Encode an audio frame from samples into buf. | |
- * | |
- * @deprecated Use avcodec_encode_audio2 instead. | |
- * | |
- * @note The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large. | |
- * However, for codecs with avctx->frame_size equal to 0 (e.g. PCM) the user | |
- * will know how much space is needed because it depends on the value passed | |
- * in buf_size as described below. In that case a lower value can be used. | |
- * | |
- * @param avctx the codec context | |
- * @param[out] buf the output buffer | |
- * @param[in] buf_size the output buffer size | |
- * @param[in] samples the input buffer containing the samples | |
- * The number of samples read from this buffer is frame_size*channels, | |
- * both of which are defined in avctx. | |
- * For codecs which have avctx->frame_size equal to 0 (e.g. PCM) the number of | |
- * samples read from samples is equal to: | |
- * buf_size * 8 / (avctx->channels * av_get_bits_per_sample(avctx->codec_id)) | |
- * This also implies that av_get_bits_per_sample() must not return 0 for these | |
- * codecs. | |
- * @return On error a negative value is returned, on success zero or the number | |
- * of bytes used to encode the data read from the input buffer. | |
- */ | |
-int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx, | |
- uint8_t *buf, int buf_size, | |
- const short *samples); | |
-#endif | |
- | |
/** | |
* Encode a frame of audio. | |
* | |
@@ -4856,8 +4697,7 @@ | |
* of the output packet. | |
* | |
* If this function fails or produces no output, avpkt will be | |
- * freed using av_free_packet() (i.e. avpkt->destruct will be | |
- * called to free the user supplied buffer). | |
+ * freed using av_packet_unref(). | |
* @param[in] frame AVFrame containing the raw audio data to be encoded. | |
* May be NULL when flushing an encoder that has the | |
* AV_CODEC_CAP_DELAY capability set. | |
@@ -4877,26 +4717,6 @@ | |
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, | |
const AVFrame *frame, int *got_packet_ptr); | |
-#if FF_API_OLD_ENCODE_VIDEO | |
-/** | |
- * @deprecated use avcodec_encode_video2() instead. | |
- * | |
- * Encode a video frame from pict into buf. | |
- * The input picture should be | |
- * stored using a specific format, namely avctx.pix_fmt. | |
- * | |
- * @param avctx the codec context | |
- * @param[out] buf the output buffer for the bitstream of encoded frame | |
- * @param[in] buf_size the size of the output buffer in bytes | |
- * @param[in] pict the input picture to encode | |
- * @return On error a negative value is returned, on success zero or the number | |
- * of bytes used from the output buffer. | |
- */ | |
-attribute_deprecated | |
-int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, | |
- const AVFrame *pict); | |
-#endif | |
- | |
/** | |
* Encode a frame of video. | |
* | |
@@ -4918,8 +4738,7 @@ | |
* caller, he is responsible for freeing it. | |
* | |
* If this function fails or produces no output, avpkt will be | |
- * freed using av_free_packet() (i.e. avpkt->destruct will be | |
- * called to free the user supplied buffer). | |
+ * freed using av_packet_unref(). | |
* @param[in] frame AVFrame containing the raw video data to be encoded. | |
* May be NULL when flushing an encoder that has the | |
* AV_CODEC_CAP_DELAY capability set. | |
@@ -5039,129 +4858,70 @@ | |
*/ | |
#endif | |
+#if FF_API_AVPICTURE | |
/** | |
* @addtogroup lavc_picture | |
* @{ | |
*/ | |
/** | |
- * Allocate memory for the pixels of a picture and setup the AVPicture | |
- * fields for it. | |
- * | |
- * Call avpicture_free() to free it. | |
- * | |
- * @param picture the picture structure to be filled in | |
- * @param pix_fmt the pixel format of the picture | |
- * @param width the width of the picture | |
- * @param height the height of the picture | |
- * @return zero if successful, a negative error code otherwise | |
- * | |
- * @see av_image_alloc(), avpicture_fill() | |
+ * @deprecated unused | |
*/ | |
+attribute_deprecated | |
int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height); | |
/** | |
- * Free a picture previously allocated by avpicture_alloc(). | |
- * The data buffer used by the AVPicture is freed, but the AVPicture structure | |
- * itself is not. | |
- * | |
- * @param picture the AVPicture to be freed | |
+ * @deprecated unused | |
*/ | |
+attribute_deprecated | |
void avpicture_free(AVPicture *picture); | |
/** | |
- * Setup the picture fields based on the specified image parameters | |
- * and the provided image data buffer. | |
- * | |
- * The picture fields are filled in by using the image data buffer | |
- * pointed to by ptr. | |
- * | |
- * If ptr is NULL, the function will fill only the picture linesize | |
- * array and return the required size for the image buffer. | |
- * | |
- * To allocate an image buffer and fill the picture data in one call, | |
- * use avpicture_alloc(). | |
- * | |
- * @param picture the picture to be filled in | |
- * @param ptr buffer where the image data is stored, or NULL | |
- * @param pix_fmt the pixel format of the image | |
- * @param width the width of the image in pixels | |
- * @param height the height of the image in pixels | |
- * @return the size in bytes required for src, a negative error code | |
- * in case of failure | |
- * | |
- * @see av_image_fill_arrays() | |
+ * @deprecated use av_image_fill_arrays() instead. | |
*/ | |
+attribute_deprecated | |
int avpicture_fill(AVPicture *picture, const uint8_t *ptr, | |
enum AVPixelFormat pix_fmt, int width, int height); | |
/** | |
- * Copy pixel data from an AVPicture into a buffer. | |
- * | |
- * avpicture_get_size() can be used to compute the required size for | |
- * the buffer to fill. | |
- * | |
- * @param src source picture with filled data | |
- * @param pix_fmt picture pixel format | |
- * @param width picture width | |
- * @param height picture height | |
- * @param dest destination buffer | |
- * @param dest_size destination buffer size in bytes | |
- * @return the number of bytes written to dest, or a negative value | |
- * (error code) on error, for example if the destination buffer is not | |
- * big enough | |
- * | |
- * @see av_image_copy_to_buffer() | |
+ * @deprecated use av_image_copy_to_buffer() instead. | |
*/ | |
+attribute_deprecated | |
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, | |
int width, int height, | |
unsigned char *dest, int dest_size); | |
/** | |
- * Calculate the size in bytes that a picture of the given width and height | |
- * would occupy if stored in the given picture format. | |
- * | |
- * @param pix_fmt picture pixel format | |
- * @param width picture width | |
- * @param height picture height | |
- * @return the computed picture buffer size or a negative error code | |
- * in case of error | |
- * | |
- * @see av_image_get_buffer_size(). | |
+ * @deprecated use av_image_get_buffer_size() instead. | |
*/ | |
+attribute_deprecated | |
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); | |
-#if FF_API_DEINTERLACE | |
/** | |
- * deinterlace - if not supported return -1 | |
- * | |
- * @deprecated - use yadif (in libavfilter) instead | |
+ * @deprecated av_image_copy() instead. | |
*/ | |
attribute_deprecated | |
-int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, | |
- enum AVPixelFormat pix_fmt, int width, int height); | |
-#endif | |
-/** | |
- * Copy image src to dst. Wraps av_image_copy(). | |
- */ | |
void av_picture_copy(AVPicture *dst, const AVPicture *src, | |
enum AVPixelFormat pix_fmt, int width, int height); | |
/** | |
- * Crop image top and left side. | |
+ * @deprecated unused | |
*/ | |
+attribute_deprecated | |
int av_picture_crop(AVPicture *dst, const AVPicture *src, | |
enum AVPixelFormat pix_fmt, int top_band, int left_band); | |
/** | |
- * Pad image. | |
+ * @deprecated unused | |
*/ | |
+attribute_deprecated | |
int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, | |
int padtop, int padbottom, int padleft, int padright, int *color); | |
/** | |
* @} | |
*/ | |
+#endif | |
/** | |
* @defgroup lavc_misc Utility functions | |
@@ -5283,6 +5043,19 @@ | |
*/ | |
const char *av_get_profile_name(const AVCodec *codec, int profile); | |
+/** | |
+ * Return a name for the specified profile, if available. | |
+ * | |
+ * @param codec_id the ID of the codec to which the requested profile belongs | |
+ * @param profile the profile value for which a name is requested | |
+ * @return A name for the profile if found, NULL otherwise. | |
+ * | |
+ * @note unlike av_get_profile_name(), which searches a list of profiles | |
+ * supported by a specific decoder or encoder implementation, this | |
+ * function searches the list of profiles from the AVCodecDescriptor | |
+ */ | |
+const char *avcodec_profile_name(enum AVCodecID codec_id, int profile); | |
+ | |
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 | |
@@ -5367,6 +5140,11 @@ | |
struct AVBitStreamFilter *filter; | |
AVCodecParserContext *parser; | |
struct AVBitStreamFilterContext *next; | |
+ /** | |
+ * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter(). | |
+ * Not for access by library users. | |
+ */ | |
+ char *args; | |
} AVBitStreamFilterContext; | |
@@ -5607,6 +5385,17 @@ | |
const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name); | |
/** | |
+ * Allocate a CPB properties structure and initialize its fields to default | |
+ * values. | |
+ * | |
+ * @param size if non-NULL, the size of the allocated struct will be written | |
+ * here. This is useful for embedding it in side data. | |
+ * | |
+ * @return the newly allocated struct or NULL on failure | |
+ */ | |
+AVCPBProperties *av_cpb_properties_alloc(size_t *size); | |
+ | |
+/** | |
* @} | |
*/ | |
Only in ffmpeg-3.0.1/libavcodec: avdct.h | |
diff -ur ffmpeg-2.8.3/libavcodec/d3d11va.h ffmpeg-3.0.1/libavcodec/d3d11va.h | |
--- ffmpeg-2.8.3/libavcodec/d3d11va.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/d3d11va.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -53,8 +53,10 @@ | |
* to the Direct3D11 FFmpeg HWAccel implementation. | |
* | |
* The application must make it available as AVCodecContext.hwaccel_context. | |
+ * | |
+ * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext. | |
*/ | |
-struct AVD3D11VAContext { | |
+typedef struct AVD3D11VAContext { | |
/** | |
* D3D11 decoder object | |
*/ | |
@@ -89,7 +91,19 @@ | |
* Private to the FFmpeg AVHWAccel implementation | |
*/ | |
unsigned report_id; | |
-}; | |
+ | |
+ /** | |
+ * Mutex to access video_context | |
+ */ | |
+ HANDLE context_mutex; | |
+} AVD3D11VAContext; | |
+ | |
+/** | |
+ * Allocate an AVD3D11VAContext. | |
+ * | |
+ * @return Newly-allocated AVD3D11VAContext or NULL on failure. | |
+ */ | |
+AVD3D11VAContext *av_d3d11va_alloc_context(void); | |
/** | |
* @} | |
Only in ffmpeg-3.0.1/libavcodec: dirac.h | |
diff -ur ffmpeg-2.8.3/libavcodec/dv_profile.h ffmpeg-3.0.1/libavcodec/dv_profile.h | |
--- ffmpeg-2.8.3/libavcodec/dv_profile.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/dv_profile.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -58,15 +58,6 @@ | |
const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */ | |
} AVDVProfile; | |
-#if FF_API_DV_FRAME_PROFILE | |
-/** | |
- * @deprecated use av_dv_frame_profile() | |
- */ | |
-attribute_deprecated | |
-const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVProfile *sys, | |
- const uint8_t* frame, unsigned buf_size); | |
-#endif | |
- | |
/** | |
* Get a DV profile for the provided compressed frame. | |
* | |
diff -ur ffmpeg-2.8.3/libavcodec/dxva2.h ffmpeg-3.0.1/libavcodec/dxva2.h | |
--- ffmpeg-2.8.3/libavcodec/dxva2.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/dxva2.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -20,8 +20,8 @@ | |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
-#ifndef AVCODEC_DXVA_H | |
-#define AVCODEC_DXVA_H | |
+#ifndef AVCODEC_DXVA2_H | |
+#define AVCODEC_DXVA2_H | |
/** | |
* @file | |
@@ -90,4 +90,4 @@ | |
* @} | |
*/ | |
-#endif /* AVCODEC_DXVA_H */ | |
+#endif /* AVCODEC_DXVA2_H */ | |
Only in ffmpeg-2.8.3/libavcodec: old_codec_ids.h | |
diff -ur ffmpeg-2.8.3/libavcodec/qsv.h ffmpeg-3.0.1/libavcodec/qsv.h | |
--- ffmpeg-2.8.3/libavcodec/qsv.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/qsv.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -23,12 +23,78 @@ | |
#include <mfx/mfxvideo.h> | |
+#include "libavutil/buffer.h" | |
+ | |
+/** | |
+ * This struct is used for communicating QSV parameters between libavcodec and | |
+ * the caller. It is managed by the caller and must be assigned to | |
+ * AVCodecContext.hwaccel_context. | |
+ * - decoding: hwaccel_context must be set on return from the get_format() | |
+ * callback | |
+ * - encoding: hwaccel_context must be set before avcodec_open2() | |
+ */ | |
typedef struct AVQSVContext { | |
+ /** | |
+ * If non-NULL, the session to use for encoding or decoding. | |
+ * Otherwise, libavcodec will try to create an internal session. | |
+ */ | |
mfxSession session; | |
+ | |
+ /** | |
+ * The IO pattern to use. | |
+ */ | |
int iopattern; | |
+ /** | |
+ * Extra buffers to pass to encoder or decoder initialization. | |
+ */ | |
mfxExtBuffer **ext_buffers; | |
int nb_ext_buffers; | |
+ | |
+ /** | |
+ * Encoding only. If this field is set to non-zero by the caller, libavcodec | |
+ * will create an mfxExtOpaqueSurfaceAlloc extended buffer and pass it to | |
+ * the encoder initialization. This only makes sense if iopattern is also | |
+ * set to MFX_IOPATTERN_IN_OPAQUE_MEMORY. | |
+ * | |
+ * The number of allocated opaque surfaces will be the sum of the number | |
+ * required by the encoder and the user-provided value nb_opaque_surfaces. | |
+ * The array of the opaque surfaces will be exported to the caller through | |
+ * the opaque_surfaces field. | |
+ */ | |
+ int opaque_alloc; | |
+ | |
+ /** | |
+ * Encoding only, and only if opaque_alloc is set to non-zero. Before | |
+ * calling avcodec_open2(), the caller should set this field to the number | |
+ * of extra opaque surfaces to allocate beyond what is required by the | |
+ * encoder. | |
+ * | |
+ * On return from avcodec_open2(), this field will be set by libavcodec to | |
+ * the total number of allocated opaque surfaces. | |
+ */ | |
+ int nb_opaque_surfaces; | |
+ | |
+ /** | |
+ * Encoding only, and only if opaque_alloc is set to non-zero. On return | |
+ * from avcodec_open2(), this field will be used by libavcodec to export the | |
+ * array of the allocated opaque surfaces to the caller, so they can be | |
+ * passed to other parts of the pipeline. | |
+ * | |
+ * The buffer reference exported here is owned and managed by libavcodec, | |
+ * the callers should make their own reference with av_buffer_ref() and free | |
+ * it with av_buffer_unref() when it is no longer needed. | |
+ * | |
+ * The buffer data is an nb_opaque_surfaces-sized array of mfxFrameSurface1. | |
+ */ | |
+ AVBufferRef *opaque_surfaces; | |
+ | |
+ /** | |
+ * Encoding only, and only if opaque_alloc is set to non-zero. On return | |
+ * from avcodec_open2(), this field will be set to the surface type used in | |
+ * the opaque allocation request. | |
+ */ | |
+ int opaque_alloc_type; | |
} AVQSVContext; | |
/** | |
diff -ur ffmpeg-2.8.3/libavcodec/vdpau.h ffmpeg-3.0.1/libavcodec/vdpau.h | |
--- ffmpeg-2.8.3/libavcodec/vdpau.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/vdpau.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -196,10 +196,13 @@ | |
*/ | |
AVVDPAUContext *av_vdpau_alloc_context(void); | |
+#if FF_API_VDPAU_PROFILE | |
/** | |
* Get a decoder profile that should be used for initializing a VDPAU decoder. | |
* Should be called from the AVCodecContext.get_format() callback. | |
* | |
+ * @deprecated Use av_vdpau_bind_context() instead. | |
+ * | |
* @param avctx the codec context being used for decoding the stream | |
* @param profile a pointer into which the result will be written on success. | |
* The contents of profile are undefined if this function returns | |
@@ -207,7 +210,9 @@ | |
* | |
* @return 0 on success (non-negative), a negative AVERROR on failure. | |
*/ | |
+attribute_deprecated | |
int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile); | |
+#endif | |
#if FF_API_CAP_VDPAU | |
/** @brief The videoSurface is used for rendering. */ | |
@@ -231,10 +236,8 @@ | |
int state; ///< Holds FF_VDPAU_STATE_* values. | |
-#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | |
/** picture parameter information for all supported codecs */ | |
union AVVDPAUPictureInfo info; | |
-#endif | |
/** Describe size/location of the compressed video data. | |
Set to 0 when freeing bitstream_buffers. */ | |
@@ -242,11 +245,6 @@ | |
int bitstream_buffers_used; | |
/** The user is responsible for freeing this buffer using av_freep(). */ | |
VdpBitstreamBuffer *bitstream_buffers; | |
- | |
-#if !AV_HAVE_INCOMPATIBLE_LIBAV_ABI | |
- /** picture parameter information for all supported codecs */ | |
- union AVVDPAUPictureInfo info; | |
-#endif | |
}; | |
#endif | |
diff -ur ffmpeg-2.8.3/libavcodec/version.h ffmpeg-3.0.1/libavcodec/version.h | |
--- ffmpeg-2.8.3/libavcodec/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -28,9 +28,9 @@ | |
#include "libavutil/version.h" | |
-#define LIBAVCODEC_VERSION_MAJOR 56 | |
-#define LIBAVCODEC_VERSION_MINOR 60 | |
-#define LIBAVCODEC_VERSION_MICRO 100 | |
+#define LIBAVCODEC_VERSION_MAJOR 57 | |
+#define LIBAVCODEC_VERSION_MINOR 24 | |
+#define LIBAVCODEC_VERSION_MICRO 102 | |
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | |
LIBAVCODEC_VERSION_MINOR, \ | |
@@ -53,134 +53,104 @@ | |
*/ | |
#ifndef FF_API_VIMA_DECODER | |
-#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_REQUEST_CHANNELS | |
-#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_OLD_DECODE_AUDIO | |
-#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_OLD_ENCODE_AUDIO | |
-#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_OLD_ENCODE_VIDEO | |
-#define FF_API_OLD_ENCODE_VIDEO (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_CODEC_ID | |
-#define FF_API_CODEC_ID (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_AUDIO_CONVERT | |
-#define FF_API_AUDIO_CONVERT (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_AUDIO_CONVERT (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_AVCODEC_RESAMPLE | |
#define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT | |
#endif | |
-#ifndef FF_API_DEINTERLACE | |
-#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_DESTRUCT_PACKET | |
-#define FF_API_DESTRUCT_PACKET (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_GET_BUFFER | |
-#define FF_API_GET_BUFFER (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#ifndef FF_API_GETCHROMA | |
+#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_MISSING_SAMPLE | |
-#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_LOWRES | |
-#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_CAP_VDPAU | |
-#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_BUFS_VDPAU | |
-#define FF_API_BUFS_VDPAU (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_BUFS_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_VOXWARE | |
-#define FF_API_VOXWARE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_VOXWARE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_SET_DIMENSIONS | |
-#define FF_API_SET_DIMENSIONS (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_SET_DIMENSIONS (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_DEBUG_MV | |
-#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_AC_VLC | |
-#define FF_API_AC_VLC (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_AC_VLC (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_OLD_MSMPEG4 | |
-#define FF_API_OLD_MSMPEG4 (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_OLD_MSMPEG4 (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_ASPECT_EXTENDED | |
-#define FF_API_ASPECT_EXTENDED (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_THREAD_OPAQUE | |
-#define FF_API_THREAD_OPAQUE (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_CODEC_PKT | |
-#define FF_API_CODEC_PKT (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_ASPECT_EXTENDED (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_ARCH_ALPHA | |
-#define FF_API_ARCH_ALPHA (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_ARCH_ALPHA (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_XVMC | |
-#define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_ERROR_RATE | |
-#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_QSCALE_TYPE | |
-#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_MB_TYPE | |
-#define FF_API_MB_TYPE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_MB_TYPE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_MAX_BFRAMES | |
-#define FF_API_MAX_BFRAMES (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_MAX_BFRAMES (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_NEG_LINESIZES | |
-#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_EMU_EDGE | |
-#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_ARCH_SH4 | |
-#define FF_API_ARCH_SH4 (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_ARCH_SH4 (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_ARCH_SPARC | |
-#define FF_API_ARCH_SPARC (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_ARCH_SPARC (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_UNUSED_MEMBERS | |
-#define FF_API_UNUSED_MEMBERS (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_UNUSED_MEMBERS (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_IDCT_XVIDMMX | |
-#define FF_API_IDCT_XVIDMMX (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_IDCT_XVIDMMX (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_INPUT_PRESERVED | |
-#define FF_API_INPUT_PRESERVED (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_INPUT_PRESERVED (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_NORMALIZE_AQP | |
-#define FF_API_NORMALIZE_AQP (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_NORMALIZE_AQP (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_GMC | |
-#define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_MV0 | |
-#define FF_API_MV0 (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_MV0 (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_CODEC_NAME | |
-#define FF_API_CODEC_NAME (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_CODEC_NAME (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_AFD | |
-#define FF_API_AFD (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_AFD (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_VISMV | |
/* XXX: don't forget to drop the -vismv documentation */ | |
-#define FF_API_VISMV (LIBAVCODEC_VERSION_MAJOR < 57) | |
-#endif | |
-#ifndef FF_API_DV_FRAME_PROFILE | |
-#define FF_API_DV_FRAME_PROFILE (LIBAVCODEC_VERSION_MAJOR < 57) | |
+#define FF_API_VISMV (LIBAVCODEC_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_AUDIOENC_DELAY | |
#define FF_API_AUDIOENC_DELAY (LIBAVCODEC_VERSION_MAJOR < 58) | |
@@ -212,5 +182,35 @@ | |
#ifndef FF_API_WITHOUT_PREFIX | |
#define FF_API_WITHOUT_PREFIX (LIBAVCODEC_VERSION_MAJOR < 59) | |
#endif | |
+#ifndef FF_API_SIDEDATA_ONLY_PKT | |
+#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_VDPAU_PROFILE | |
+#define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_CONVERGENCE_DURATION | |
+#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_AVPICTURE | |
+#define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_AVPACKET_OLD_API | |
+#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_RTP_CALLBACK | |
+#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_VBV_DELAY | |
+#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_CODER_TYPE | |
+#define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_STAT_BITS | |
+#define FF_API_STAT_BITS (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
+#ifndef FF_API_PRIVATE_OPT | |
+#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59) | |
+#endif | |
#endif /* AVCODEC_VERSION_H */ | |
diff -ur ffmpeg-2.8.3/libavcodec/vorbis_parser.h ffmpeg-3.0.1/libavcodec/vorbis_parser.h | |
--- ffmpeg-2.8.3/libavcodec/vorbis_parser.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/vorbis_parser.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -24,8 +24,8 @@ | |
* Determines the duration for each packet. | |
*/ | |
-#ifndef AVCODEC_VORBIS_PARSE_H | |
-#define AVCODEC_VORBIS_PARSE_H | |
+#ifndef AVCODEC_VORBIS_PARSER_H | |
+#define AVCODEC_VORBIS_PARSER_H | |
#include <stdint.h> | |
@@ -75,4 +75,4 @@ | |
void av_vorbis_parse_reset(AVVorbisParseContext *s); | |
-#endif /* AVCODEC_VORBIS_PARSE_H */ | |
+#endif /* AVCODEC_VORBIS_PARSER_H */ | |
diff -ur ffmpeg-2.8.3/libavcodec/xvmc.h ffmpeg-3.0.1/libavcodec/xvmc.h | |
--- ffmpeg-2.8.3/libavcodec/xvmc.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavcodec/xvmc.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -43,7 +43,7 @@ | |
#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) */ | |
-attribute_deprecated struct xvmc_pix_fmt { | |
+struct attribute_deprecated xvmc_pix_fmt { | |
/** The field contains the special constant value AV_XVMC_ID. | |
It is used as a test that the application correctly uses the API, | |
and that there is no corruption caused by pixel routines. | |
diff -ur ffmpeg-2.8.3/libavdevice/version.h ffmpeg-3.0.1/libavdevice/version.h | |
--- ffmpeg-2.8.3/libavdevice/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavdevice/version.h 2016-04-03 16:17:34.000000000 +0200 | |
@@ -27,9 +27,9 @@ | |
#include "libavutil/version.h" | |
-#define LIBAVDEVICE_VERSION_MAJOR 56 | |
-#define LIBAVDEVICE_VERSION_MINOR 4 | |
-#define LIBAVDEVICE_VERSION_MICRO 100 | |
+#define LIBAVDEVICE_VERSION_MAJOR 57 | |
+#define LIBAVDEVICE_VERSION_MINOR 0 | |
+#define LIBAVDEVICE_VERSION_MICRO 101 | |
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ | |
LIBAVDEVICE_VERSION_MINOR, \ | |
Only in ffmpeg-2.8.3/libavfilter: asrc_abuffer.h | |
Only in ffmpeg-2.8.3/libavfilter: avcodec.h | |
diff -ur ffmpeg-2.8.3/libavfilter/avfilter.h ffmpeg-3.0.1/libavfilter/avfilter.h | |
--- ffmpeg-2.8.3/libavfilter/avfilter.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavfilter/avfilter.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -66,335 +66,6 @@ | |
typedef struct AVFilterPad AVFilterPad; | |
typedef struct AVFilterFormats AVFilterFormats; | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * A reference-counted buffer data type used by the filter system. Filters | |
- * should not store pointers to this structure directly, but instead use the | |
- * AVFilterBufferRef structure below. | |
- */ | |
-typedef struct AVFilterBuffer { | |
- uint8_t *data[8]; ///< buffer data for each plane/channel | |
- | |
- /** | |
- * pointers to the data planes/channels. | |
- * | |
- * For video, this should simply point to data[]. | |
- * | |
- * For planar audio, each channel has a separate data pointer, and | |
- * linesize[0] contains the size of each channel buffer. | |
- * For packed audio, there is just one data pointer, and linesize[0] | |
- * contains the total size of the buffer for all channels. | |
- * | |
- * Note: Both data and extended_data will always be set, but for planar | |
- * audio with more channels that can fit in data, extended_data must be used | |
- * in order to access all channels. | |
- */ | |
- uint8_t **extended_data; | |
- int linesize[8]; ///< number of bytes per line | |
- | |
- /** private data to be used by a custom free function */ | |
- void *priv; | |
- /** | |
- * A pointer to the function to deallocate this buffer if the default | |
- * function is not sufficient. This could, for example, add the memory | |
- * back into a memory pool to be reused later without the overhead of | |
- * reallocating it from scratch. | |
- */ | |
- void (*free)(struct AVFilterBuffer *buf); | |
- | |
- int format; ///< media format | |
- int w, h; ///< width and height of the allocated buffer | |
- unsigned refcount; ///< number of references to this buffer | |
-} AVFilterBuffer; | |
- | |
-#define AV_PERM_READ 0x01 ///< can read from the buffer | |
-#define AV_PERM_WRITE 0x02 ///< can write to the buffer | |
-#define AV_PERM_PRESERVE 0x04 ///< nobody else can overwrite the buffer | |
-#define AV_PERM_REUSE 0x08 ///< can output the buffer multiple times, with the same contents each time | |
-#define AV_PERM_REUSE2 0x10 ///< can output the buffer multiple times, modified each time | |
-#define AV_PERM_NEG_LINESIZES 0x20 ///< the buffer requested can have negative linesizes | |
-#define AV_PERM_ALIGN 0x40 ///< the buffer must be aligned | |
- | |
-#define AVFILTER_ALIGN 16 //not part of ABI | |
- | |
-/** | |
- * Audio specific properties in a reference to an AVFilterBuffer. Since | |
- * AVFilterBufferRef is common to different media formats, audio specific | |
- * per reference properties must be separated out. | |
- */ | |
-typedef struct AVFilterBufferRefAudioProps { | |
- uint64_t channel_layout; ///< channel layout of audio buffer | |
- int nb_samples; ///< number of audio samples per channel | |
- int sample_rate; ///< audio buffer sample rate | |
- int channels; ///< number of channels (do not access directly) | |
-} AVFilterBufferRefAudioProps; | |
- | |
-/** | |
- * Video specific properties in a reference to an AVFilterBuffer. Since | |
- * AVFilterBufferRef is common to different media formats, video specific | |
- * per reference properties must be separated out. | |
- */ | |
-typedef struct AVFilterBufferRefVideoProps { | |
- int w; ///< image width | |
- int h; ///< image height | |
- AVRational sample_aspect_ratio; ///< sample aspect ratio | |
- int interlaced; ///< is frame interlaced | |
- int top_field_first; ///< field order | |
- enum AVPictureType pict_type; ///< picture type of the frame | |
- int key_frame; ///< 1 -> keyframe, 0-> not | |
- int qp_table_linesize; ///< qp_table stride | |
- int qp_table_size; ///< qp_table size | |
- int8_t *qp_table; ///< array of Quantization Parameters | |
-} AVFilterBufferRefVideoProps; | |
- | |
-/** | |
- * A reference to an AVFilterBuffer. Since filters can manipulate the origin of | |
- * a buffer to, for example, crop image without any memcpy, the buffer origin | |
- * and dimensions are per-reference properties. Linesize is also useful for | |
- * image flipping, frame to field filters, etc, and so is also per-reference. | |
- * | |
- * TODO: add anything necessary for frame reordering | |
- */ | |
-typedef struct AVFilterBufferRef { | |
- AVFilterBuffer *buf; ///< the buffer that this is a reference to | |
- uint8_t *data[8]; ///< picture/audio data for each plane | |
- /** | |
- * pointers to the data planes/channels. | |
- * | |
- * For video, this should simply point to data[]. | |
- * | |
- * For planar audio, each channel has a separate data pointer, and | |
- * linesize[0] contains the size of each channel buffer. | |
- * For packed audio, there is just one data pointer, and linesize[0] | |
- * contains the total size of the buffer for all channels. | |
- * | |
- * Note: Both data and extended_data will always be set, but for planar | |
- * audio with more channels that can fit in data, extended_data must be used | |
- * in order to access all channels. | |
- */ | |
- uint8_t **extended_data; | |
- int linesize[8]; ///< number of bytes per line | |
- | |
- AVFilterBufferRefVideoProps *video; ///< video buffer specific properties | |
- AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties | |
- | |
- /** | |
- * presentation timestamp. The time unit may change during | |
- * filtering, as it is specified in the link and the filter code | |
- * may need to rescale the PTS accordingly. | |
- */ | |
- int64_t pts; | |
- int64_t pos; ///< byte position in stream, -1 if unknown | |
- | |
- int format; ///< media format | |
- | |
- int perms; ///< permissions, see the AV_PERM_* flags | |
- | |
- enum AVMediaType type; ///< media type of buffer data | |
- | |
- AVDictionary *metadata; ///< dictionary containing metadata key=value tags | |
-} AVFilterBufferRef; | |
- | |
-/** | |
- * Copy properties of src to dst, without copying the actual data | |
- */ | |
-attribute_deprecated | |
-void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, const AVFilterBufferRef *src); | |
- | |
-/** | |
- * Add a new reference to a buffer. | |
- * | |
- * @param ref an existing reference to the buffer | |
- * @param pmask a bitmask containing the allowable permissions in the new | |
- * reference | |
- * @return a new reference to the buffer with the same properties as the | |
- * old, excluding any permissions denied by pmask | |
- */ | |
-attribute_deprecated | |
-AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); | |
- | |
-/** | |
- * Remove a reference to a buffer. If this is the last reference to the | |
- * buffer, the buffer itself is also automatically freed. | |
- * | |
- * @param ref reference to the buffer, may be NULL | |
- * | |
- * @note it is recommended to use avfilter_unref_bufferp() instead of this | |
- * function | |
- */ | |
-attribute_deprecated | |
-void avfilter_unref_buffer(AVFilterBufferRef *ref); | |
- | |
-/** | |
- * Remove a reference to a buffer and set the pointer to NULL. | |
- * If this is the last reference to the buffer, the buffer itself | |
- * is also automatically freed. | |
- * | |
- * @param ref pointer to the buffer reference | |
- */ | |
-attribute_deprecated | |
-void avfilter_unref_bufferp(AVFilterBufferRef **ref); | |
- | |
-/** | |
- * Get the number of channels of a buffer reference. | |
- */ | |
-attribute_deprecated | |
-int avfilter_ref_get_channels(AVFilterBufferRef *ref); | |
-#endif | |
- | |
-#if FF_API_AVFILTERPAD_PUBLIC | |
-/** | |
- * A filter pad used for either input or output. | |
- * | |
- * See doc/filter_design.txt for details on how to implement the methods. | |
- * | |
- * @warning this struct might be removed from public API. | |
- * users should call avfilter_pad_get_name() and avfilter_pad_get_type() | |
- * to access the name and type fields; there should be no need to access | |
- * any other fields from outside of libavfilter. | |
- */ | |
-struct AVFilterPad { | |
- /** | |
- * Pad name. The name is unique among inputs and among outputs, but an | |
- * input may have the same name as an output. This may be NULL if this | |
- * pad has no need to ever be referenced by name. | |
- */ | |
- const char *name; | |
- | |
- /** | |
- * AVFilterPad type. | |
- */ | |
- enum AVMediaType type; | |
- | |
- /** | |
- * Input pads: | |
- * Minimum required permissions on incoming buffers. Any buffer with | |
- * insufficient permissions will be automatically copied by the filter | |
- * system to a new buffer which provides the needed access permissions. | |
- * | |
- * Output pads: | |
- * Guaranteed permissions on outgoing buffers. Any buffer pushed on the | |
- * link must have at least these permissions; this fact is checked by | |
- * asserts. It can be used to optimize buffer allocation. | |
- */ | |
- attribute_deprecated int min_perms; | |
- | |
- /** | |
- * Input pads: | |
- * Permissions which are not accepted on incoming buffers. Any buffer | |
- * which has any of these permissions set will be automatically copied | |
- * by the filter system to a new buffer which does not have those | |
- * permissions. This can be used to easily disallow buffers with | |
- * AV_PERM_REUSE. | |
- * | |
- * Output pads: | |
- * Permissions which are automatically removed on outgoing buffers. It | |
- * can be used to optimize buffer allocation. | |
- */ | |
- attribute_deprecated int rej_perms; | |
- | |
- /** | |
- * @deprecated unused | |
- */ | |
- int (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref); | |
- | |
- /** | |
- * Callback function to get a video buffer. If NULL, the filter system will | |
- * use ff_default_get_video_buffer(). | |
- * | |
- * Input video pads only. | |
- */ | |
- AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h); | |
- | |
- /** | |
- * Callback function to get an audio buffer. If NULL, the filter system will | |
- * use ff_default_get_audio_buffer(). | |
- * | |
- * Input audio pads only. | |
- */ | |
- AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples); | |
- | |
- /** | |
- * @deprecated unused | |
- */ | |
- int (*end_frame)(AVFilterLink *link); | |
- | |
- /** | |
- * @deprecated unused | |
- */ | |
- int (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir); | |
- | |
- /** | |
- * Filtering callback. This is where a filter receives a frame with | |
- * audio/video data and should do its processing. | |
- * | |
- * Input pads only. | |
- * | |
- * @return >= 0 on success, a negative AVERROR on error. This function | |
- * must ensure that frame is properly unreferenced on error if it | |
- * hasn't been passed on to another filter. | |
- */ | |
- int (*filter_frame)(AVFilterLink *link, AVFrame *frame); | |
- | |
- /** | |
- * Frame poll callback. This returns the number of immediately available | |
- * samples. It should return a positive value if the next request_frame() | |
- * is guaranteed to return one frame (with no delay). | |
- * | |
- * Defaults to just calling the source poll_frame() method. | |
- * | |
- * Output pads only. | |
- */ | |
- int (*poll_frame)(AVFilterLink *link); | |
- | |
- /** | |
- * Frame request callback. A call to this should result in at least one | |
- * frame being output over the given link. This should return zero on | |
- * success, and another value on error. | |
- * See ff_request_frame() for the error codes with a specific | |
- * meaning. | |
- * | |
- * Output pads only. | |
- */ | |
- int (*request_frame)(AVFilterLink *link); | |
- | |
- /** | |
- * Link configuration callback. | |
- * | |
- * For output pads, this should set the following link properties: | |
- * video: width, height, sample_aspect_ratio, time_base | |
- * audio: sample_rate. | |
- * | |
- * This should NOT set properties such as format, channel_layout, etc which | |
- * are negotiated between filters by the filter system using the | |
- * query_formats() callback before this function is called. | |
- * | |
- * For input pads, this should check the properties of the link, and update | |
- * the filter's internal state as necessary. | |
- * | |
- * For both input and output pads, this should return zero on success, | |
- * and another value on error. | |
- */ | |
- int (*config_props)(AVFilterLink *link); | |
- | |
- /** | |
- * The filter expects a fifo to be inserted on its input link, | |
- * typically because it has a delay. | |
- * | |
- * input pads only. | |
- */ | |
- int needs_fifo; | |
- | |
- /** | |
- * The filter expects writable frames from its input link, | |
- * duplicating data buffers if needed. | |
- * | |
- * input pads only. | |
- */ | |
- int needs_writable; | |
-}; | |
-#endif | |
- | |
/** | |
* Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. | |
* AVFilter.inputs/outputs). | |
@@ -639,16 +310,10 @@ | |
AVFilterPad *input_pads; ///< array of input pads | |
AVFilterLink **inputs; ///< array of pointers to input links | |
-#if FF_API_FOO_COUNT | |
- attribute_deprecated unsigned input_count; ///< @deprecated use nb_inputs | |
-#endif | |
unsigned nb_inputs; ///< number of input pads | |
AVFilterPad *output_pads; ///< array of output pads | |
AVFilterLink **outputs; ///< array of pointers to output links | |
-#if FF_API_FOO_COUNT | |
- attribute_deprecated unsigned output_count; ///< @deprecated use nb_outputs | |
-#endif | |
unsigned nb_outputs; ///< number of output pads | |
void *priv; ///< private data for use by the filter | |
@@ -763,10 +428,6 @@ | |
AVLINK_INIT ///< complete | |
} init_state; | |
-#if FF_API_AVFILTERBUFFER | |
- struct AVFilterPool *pool; | |
-#endif | |
- | |
/** | |
* Graph the filter belongs to. | |
*/ | |
@@ -774,21 +435,28 @@ | |
/** | |
* Current timestamp of the link, as defined by the most recent | |
- * frame(s), in AV_TIME_BASE units. | |
+ * frame(s), in link time_base units. | |
*/ | |
int64_t current_pts; | |
/** | |
+ * Current timestamp of the link, as defined by the most recent | |
+ * frame(s), in AV_TIME_BASE units. | |
+ */ | |
+ int64_t current_pts_us; | |
+ | |
+ /** | |
* Index in the age array. | |
*/ | |
int age_index; | |
/** | |
- * Frame rate of the stream on the link, or 1/0 if unknown; | |
- * if left to 0/0, will be automatically be copied from the first input | |
+ * Frame rate of the stream on the link, or 1/0 if unknown or variable; | |
+ * if left to 0/0, will be automatically copied from the first input | |
* of the source filter if it exists. | |
* | |
* Sources should set it to the best estimation of the real frame rate. | |
+ * If the source frame rate is unknown or variable, set this to 1/0. | |
* Filters should update it if necessary depending on their function. | |
* Sinks can use it to set a default output frame rate. | |
* It is similar to the r_frame_rate field in AVStream. | |
@@ -821,28 +489,17 @@ | |
*/ | |
int max_samples; | |
-#if FF_API_AVFILTERBUFFER | |
/** | |
- * The buffer reference currently being received across the link by the | |
- * destination filter. This is used internally by the filter system to | |
- * allow automatic copying of buffers which do not have sufficient | |
- * permissions for the destination. This should not be accessed directly | |
- * by the filters. | |
- */ | |
- AVFilterBufferRef *cur_buf_copy; | |
-#endif | |
- | |
- /** | |
- * True if the link is closed. | |
- * If set, all attempts of start_frame, filter_frame or request_frame | |
- * will fail with AVERROR_EOF, and if necessary the reference will be | |
- * destroyed. | |
- * If request_frame returns AVERROR_EOF, this flag is set on the | |
+ * Link status. | |
+ * If not zero, all attempts of filter_frame or request_frame | |
+ * will fail with the corresponding code, and if necessary the reference | |
+ * will be destroyed. | |
+ * If request_frame returns an error, the status is set on the | |
* corresponding link. | |
* It can be set also be set by either the source or the destination | |
* filter. | |
*/ | |
- int closed; | |
+ int status; | |
/** | |
* Number of channels. | |
@@ -850,12 +507,6 @@ | |
int channels; | |
/** | |
- * True if a frame is being requested on the link. | |
- * Used internally by the framework. | |
- */ | |
- unsigned frame_requested; | |
- | |
- /** | |
* Link processing flags. | |
*/ | |
unsigned flags; | |
@@ -864,6 +515,25 @@ | |
* Number of past frames sent through the link. | |
*/ | |
int64_t frame_count; | |
+ | |
+ /** | |
+ * A pointer to a FFVideoFramePool struct. | |
+ */ | |
+ void *video_frame_pool; | |
+ | |
+ /** | |
+ * True if a frame is currently wanted on the input of this filter. | |
+ * Set when ff_request_frame() is called by the output, | |
+ * cleared when the request is handled or forwarded. | |
+ */ | |
+ int frame_wanted_in; | |
+ | |
+ /** | |
+ * True if a frame is currently wanted on the output of this filter. | |
+ * Set when ff_request_frame() is called by the output, | |
+ * cleared when a frame is filtered. | |
+ */ | |
+ int frame_wanted_out; | |
}; | |
/** | |
@@ -890,7 +560,10 @@ | |
/** | |
* Set the closed field of a link. | |
+ * @deprecated applications are not supposed to mess with links, they should | |
+ * close the sinks. | |
*/ | |
+attribute_deprecated | |
void avfilter_link_set_closed(AVFilterLink *link, int closed); | |
/** | |
@@ -901,69 +574,6 @@ | |
*/ | |
int avfilter_config_links(AVFilterContext *filter); | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * Create a buffer reference wrapped around an already allocated image | |
- * buffer. | |
- * | |
- * @param data pointers to the planes of the image to reference | |
- * @param linesize linesizes for the planes of the image to reference | |
- * @param perms the required access permissions | |
- * @param w the width of the image specified by the data and linesize arrays | |
- * @param h the height of the image specified by the data and linesize arrays | |
- * @param format the pixel format of the image specified by the data and linesize arrays | |
- */ | |
-attribute_deprecated | |
-AVFilterBufferRef * | |
-avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms, | |
- int w, int h, enum AVPixelFormat format); | |
- | |
-/** | |
- * Create an audio buffer reference wrapped around an already | |
- * allocated samples buffer. | |
- * | |
- * See avfilter_get_audio_buffer_ref_from_arrays_channels() for a version | |
- * that can handle unknown channel layouts. | |
- * | |
- * @param data pointers to the samples plane buffers | |
- * @param linesize linesize for the samples plane buffers | |
- * @param perms the required access permissions | |
- * @param nb_samples number of samples per channel | |
- * @param sample_fmt the format of each sample in the buffer to allocate | |
- * @param channel_layout the channel layout of the buffer | |
- */ | |
-attribute_deprecated | |
-AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, | |
- int linesize, | |
- int perms, | |
- int nb_samples, | |
- enum AVSampleFormat sample_fmt, | |
- uint64_t channel_layout); | |
-/** | |
- * Create an audio buffer reference wrapped around an already | |
- * allocated samples buffer. | |
- * | |
- * @param data pointers to the samples plane buffers | |
- * @param linesize linesize for the samples plane buffers | |
- * @param perms the required access permissions | |
- * @param nb_samples number of samples per channel | |
- * @param sample_fmt the format of each sample in the buffer to allocate | |
- * @param channels the number of channels of the buffer | |
- * @param channel_layout the channel layout of the buffer, | |
- * must be either 0 or consistent with channels | |
- */ | |
-attribute_deprecated | |
-AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays_channels(uint8_t **data, | |
- int linesize, | |
- int perms, | |
- int nb_samples, | |
- enum AVSampleFormat sample_fmt, | |
- int channels, | |
- uint64_t channel_layout); | |
- | |
-#endif | |
- | |
- | |
#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically | |
#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw) | |
@@ -1110,26 +720,6 @@ | |
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, | |
unsigned filt_srcpad_idx, unsigned filt_dstpad_idx); | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * Copy the frame properties of src to dst, without copying the actual | |
- * image data. | |
- * | |
- * @return 0 on success, a negative number on error. | |
- */ | |
-attribute_deprecated | |
-int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); | |
- | |
-/** | |
- * Copy the frame properties and data pointers of src to dst, without copying | |
- * the actual data. | |
- * | |
- * @return 0 on success, a negative number on error. | |
- */ | |
-attribute_deprecated | |
-int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src); | |
-#endif | |
- | |
/** | |
* @return AVClass for AVFilterContext. | |
* | |
@@ -1170,20 +760,11 @@ | |
typedef struct AVFilterGraph { | |
const AVClass *av_class; | |
-#if FF_API_FOO_COUNT | |
- attribute_deprecated | |
- unsigned filter_count_unused; | |
-#endif | |
AVFilterContext **filters; | |
-#if !FF_API_FOO_COUNT | |
unsigned nb_filters; | |
-#endif | |
char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters | |
char *resample_lavr_opts; ///< libavresample options to use for the auto-inserted resample filters | |
-#if FF_API_FOO_COUNT | |
- unsigned nb_filters; | |
-#endif | |
/** | |
* Type of multithreading allowed for filters in this graph. A combination | |
@@ -1379,7 +960,6 @@ | |
*/ | |
void avfilter_inout_free(AVFilterInOut **inout); | |
-#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI || !FF_API_OLD_GRAPH_PARSE | |
/** | |
* Add a graph described by a string to a graph. | |
* | |
@@ -1401,26 +981,6 @@ | |
int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, | |
AVFilterInOut *inputs, AVFilterInOut *outputs, | |
void *log_ctx); | |
-#else | |
-/** | |
- * Add a graph described by a string to a graph. | |
- * | |
- * @param graph the filter graph where to link the parsed graph context | |
- * @param filters string to be parsed | |
- * @param inputs pointer to a linked list to the inputs of the graph, may be NULL. | |
- * If non-NULL, *inputs is updated to contain the list of open inputs | |
- * after the parsing, should be freed with avfilter_inout_free(). | |
- * @param outputs pointer to a linked list to the outputs of the graph, may be NULL. | |
- * If non-NULL, *outputs is updated to contain the list of open outputs | |
- * after the parsing, should be freed with avfilter_inout_free(). | |
- * @return non negative on success, a negative AVERROR code on error | |
- * @deprecated Use avfilter_graph_parse_ptr() instead. | |
- */ | |
-attribute_deprecated | |
-int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, | |
- AVFilterInOut **inputs, AVFilterInOut **outputs, | |
- void *log_ctx); | |
-#endif | |
/** | |
* Add a graph described by a string to a graph. | |
diff -ur ffmpeg-2.8.3/libavfilter/buffersink.h ffmpeg-3.0.1/libavfilter/buffersink.h | |
--- ffmpeg-2.8.3/libavfilter/buffersink.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavfilter/buffersink.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -33,63 +33,6 @@ | |
* @{ | |
*/ | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * Get an audio/video buffer data from buffer_sink and put it in bufref. | |
- * | |
- * This function works with both audio and video buffer sinks. | |
- * | |
- * @param buffer_sink pointer to a buffersink or abuffersink context | |
- * @param flags a combination of AV_BUFFERSINK_FLAG_* flags | |
- * @return >= 0 in case of success, a negative AVERROR code in case of | |
- * failure | |
- */ | |
-attribute_deprecated | |
-int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink, | |
- AVFilterBufferRef **bufref, int flags); | |
- | |
-/** | |
- * Get the number of immediately available frames. | |
- */ | |
-attribute_deprecated | |
-int av_buffersink_poll_frame(AVFilterContext *ctx); | |
- | |
-/** | |
- * Get a buffer with filtered data from sink and put it in buf. | |
- * | |
- * @param ctx pointer to a context of a buffersink or abuffersink AVFilter. | |
- * @param buf pointer to the buffer will be written here if buf is non-NULL. buf | |
- * must be freed by the caller using avfilter_unref_buffer(). | |
- * Buf may also be NULL to query whether a buffer is ready to be | |
- * output. | |
- * | |
- * @return >= 0 in case of success, a negative AVERROR code in case of | |
- * failure. | |
- */ | |
-attribute_deprecated | |
-int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf); | |
- | |
-/** | |
- * Same as av_buffersink_read, but with the ability to specify the number of | |
- * samples read. This function is less efficient than av_buffersink_read(), | |
- * because it copies the data around. | |
- * | |
- * @param ctx pointer to a context of the abuffersink AVFilter. | |
- * @param buf pointer to the buffer will be written here if buf is non-NULL. buf | |
- * must be freed by the caller using avfilter_unref_buffer(). buf | |
- * will contain exactly nb_samples audio samples, except at the end | |
- * of stream, when it can contain less than nb_samples. | |
- * Buf may also be NULL to query whether a buffer is ready to be | |
- * output. | |
- * | |
- * @warning do not mix this function with av_buffersink_read(). Use only one or | |
- * the other with a single sink, not both. | |
- */ | |
-attribute_deprecated | |
-int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf, | |
- int nb_samples); | |
-#endif | |
- | |
/** | |
* Get a frame with filtered data from sink and put it in frame. | |
* | |
diff -ur ffmpeg-2.8.3/libavfilter/buffersrc.h ffmpeg-3.0.1/libavfilter/buffersrc.h | |
--- ffmpeg-2.8.3/libavfilter/buffersrc.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavfilter/buffersrc.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -42,13 +42,6 @@ | |
*/ | |
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1, | |
-#if FF_API_AVFILTERBUFFER | |
- /** | |
- * Ignored | |
- */ | |
- AV_BUFFERSRC_FLAG_NO_COPY = 2, | |
-#endif | |
- | |
/** | |
* Immediately push the frame to the output. | |
*/ | |
@@ -63,21 +56,6 @@ | |
}; | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * Add buffer data in picref to buffer_src. | |
- * | |
- * @param buffer_src pointer to a buffer source context | |
- * @param picref a buffer reference, or NULL to mark EOF | |
- * @param flags a combination of AV_BUFFERSRC_FLAG_* | |
- * @return >= 0 in case of success, a negative AVERROR code | |
- * in case of failure | |
- */ | |
-attribute_deprecated | |
-int av_buffersrc_add_ref(AVFilterContext *buffer_src, | |
- AVFilterBufferRef *picref, int flags); | |
-#endif | |
- | |
/** | |
* Get the number of failed requests. | |
* | |
@@ -87,21 +65,6 @@ | |
*/ | |
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src); | |
-#if FF_API_AVFILTERBUFFER | |
-/** | |
- * Add a buffer to a filtergraph. | |
- * | |
- * @param ctx an instance of the buffersrc filter | |
- * @param buf buffer containing frame data to be passed down the filtergraph. | |
- * This function will take ownership of buf, the user must not free it. | |
- * A NULL buf signals EOF -- i.e. no more frames will be sent to this filter. | |
- * | |
- * @deprecated use av_buffersrc_write_frame() or av_buffersrc_add_frame() | |
- */ | |
-attribute_deprecated | |
-int av_buffersrc_buffer(AVFilterContext *ctx, AVFilterBufferRef *buf); | |
-#endif | |
- | |
/** | |
* Add a frame to the buffer source. | |
* | |
@@ -115,6 +78,7 @@ | |
* This function is equivalent to av_buffersrc_add_frame_flags() with the | |
* AV_BUFFERSRC_FLAG_KEEP_REF flag. | |
*/ | |
+av_warn_unused_result | |
int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame); | |
/** | |
@@ -135,6 +99,7 @@ | |
* This function is equivalent to av_buffersrc_add_frame_flags() without the | |
* AV_BUFFERSRC_FLAG_KEEP_REF flag. | |
*/ | |
+av_warn_unused_result | |
int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame); | |
/** | |
@@ -152,6 +117,7 @@ | |
* @return >= 0 in case of success, a negative AVERROR code | |
* in case of failure | |
*/ | |
+av_warn_unused_result | |
int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src, | |
AVFrame *frame, int flags); | |
diff -ur ffmpeg-2.8.3/libavfilter/version.h ffmpeg-3.0.1/libavfilter/version.h | |
--- ffmpeg-2.8.3/libavfilter/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavfilter/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -29,9 +29,9 @@ | |
#include "libavutil/version.h" | |
-#define LIBAVFILTER_VERSION_MAJOR 5 | |
-#define LIBAVFILTER_VERSION_MINOR 40 | |
-#define LIBAVFILTER_VERSION_MICRO 101 | |
+#define LIBAVFILTER_VERSION_MAJOR 6 | |
+#define LIBAVFILTER_VERSION_MINOR 31 | |
+#define LIBAVFILTER_VERSION_MICRO 100 | |
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | |
LIBAVFILTER_VERSION_MINOR, \ | |
@@ -49,35 +49,23 @@ | |
* the public API and may change, break or disappear at any time. | |
*/ | |
-#ifndef FF_API_AVFILTERPAD_PUBLIC | |
-#define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 6) | |
-#endif | |
-#ifndef FF_API_FOO_COUNT | |
-#define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 6) | |
-#endif | |
-#ifndef FF_API_AVFILTERBUFFER | |
-#define FF_API_AVFILTERBUFFER (LIBAVFILTER_VERSION_MAJOR < 6) | |
-#endif | |
#ifndef FF_API_OLD_FILTER_OPTS | |
-#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 6) | |
+#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#ifndef FF_API_OLD_FILTER_OPTS_ERROR | |
#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#ifndef FF_API_AVFILTER_OPEN | |
-#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 6) | |
+#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#ifndef FF_API_AVFILTER_INIT_FILTER | |
-#define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 6) | |
+#define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#ifndef FF_API_OLD_FILTER_REGISTER | |
-#define FF_API_OLD_FILTER_REGISTER (LIBAVFILTER_VERSION_MAJOR < 6) | |
-#endif | |
-#ifndef FF_API_OLD_GRAPH_PARSE | |
-#define FF_API_OLD_GRAPH_PARSE (LIBAVFILTER_VERSION_MAJOR < 5) | |
+#define FF_API_OLD_FILTER_REGISTER (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#ifndef FF_API_NOCONST_GET_NAME | |
-#define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 6) | |
+#define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 7) | |
#endif | |
#endif /* AVFILTER_VERSION_H */ | |
diff -ur ffmpeg-2.8.3/libavformat/avformat.h ffmpeg-3.0.1/libavformat/avformat.h | |
--- ffmpeg-2.8.3/libavformat/avformat.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavformat/avformat.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -78,6 +78,18 @@ | |
* if its AVClass is non-NULL, and the protocols layer. See the discussion on | |
* nesting in @ref avoptions documentation to learn how to access those. | |
* | |
+ * @section urls | |
+ * URL strings in libavformat are made of a scheme/protocol, a ':', and a | |
+ * scheme specific string. URLs without a scheme and ':' used for local files | |
+ * are supported but deprecated. "file:" should be used for local files. | |
+ * | |
+ * It is important that the scheme string is not taken from untrusted | |
+ * sources without checks. | |
+ * | |
+ * Note that some schemes/protocols are quite powerful, allowing access to | |
+ * both local and remote files, parts of them, concatenations of them, local | |
+ * audio and video devices and so on. | |
+ * | |
* @defgroup lavf_decoding Demuxing | |
* @{ | |
* Demuxers read a media file and split it into chunks of data (@em packets). A | |
@@ -88,10 +100,10 @@ | |
* cleanup. | |
* | |
* @section lavf_decoding_open Opening a media file | |
- * The minimum information required to open a file is its URL or filename, which | |
+ * The minimum information required to open a file is its URL, which | |
* is passed to avformat_open_input(), as in the following code: | |
* @code | |
- * const char *url = "in.mp3"; | |
+ * const char *url = "file:in.mp3"; | |
* AVFormatContext *s = NULL; | |
* int ret = avformat_open_input(&s, url, NULL, NULL); | |
* if (ret < 0) | |
@@ -165,7 +177,7 @@ | |
* until the next av_read_frame() call or closing the file. If the caller | |
* requires a longer lifetime, av_dup_packet() will make an av_malloc()ed copy | |
* of it. | |
- * In both cases, the packet must be freed with av_free_packet() when it is no | |
+ * In both cases, the packet must be freed with av_packet_unref() when it is no | |
* longer needed. | |
* | |
* @section lavf_decoding_seek Seeking | |
@@ -465,8 +477,10 @@ | |
#define AVFMT_NOFILE 0x0001 | |
#define AVFMT_NEEDNUMBER 0x0002 /**< Needs '%d' in filename. */ | |
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */ | |
+#if FF_API_LAVF_FMT_RAWPICTURE | |
#define AVFMT_RAWPICTURE 0x0020 /**< Format wants AVPicture structure for | |
- raw picture data. */ | |
+ raw picture data. @deprecated Not used anymore */ | |
+#endif | |
#define AVFMT_GLOBALHEADER 0x0040 /**< Format wants global header. */ | |
#define AVFMT_NOTIMESTAMPS 0x0080 /**< Format does not need / have any timestamps. */ | |
#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */ | |
@@ -478,12 +492,7 @@ | |
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */ | |
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */ | |
#define AVFMT_ALLOW_FLUSH 0x10000 /**< Format allows flushing. If not set, the muxer will not receive a NULL packet in the write_packet function. */ | |
-#if LIBAVFORMAT_VERSION_MAJOR <= 54 | |
-#define AVFMT_TS_NONSTRICT 0x8020000 //we try to be compatible to the ABIs of ffmpeg and major forks | |
-#else | |
-#define AVFMT_TS_NONSTRICT 0x20000 | |
-#endif | |
- /**< Format does not require strictly | |
+#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly | |
increasing timestamps, but they must | |
still be monotonic */ | |
#define AVFMT_TS_NEGATIVE 0x40000 /**< Format allows muxing negative | |
@@ -516,7 +525,7 @@ | |
enum AVCodecID video_codec; /**< default video codec */ | |
enum AVCodecID subtitle_codec; /**< default subtitle codec */ | |
/** | |
- * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE, | |
+ * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, | |
* AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, | |
* AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, | |
* AVFMT_TS_NONSTRICT | |
@@ -603,6 +612,29 @@ | |
*/ | |
int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); | |
enum AVCodecID data_codec; /**< default data codec */ | |
+ /** | |
+ * Initialize format. May allocate data here, and set any AVFormatContext or | |
+ * AVStream parameters that need to be set before packets are sent. | |
+ * This method must not write output. | |
+ * | |
+ * Any allocations made here must be freed in deinit(). | |
+ */ | |
+ int (*init)(struct AVFormatContext *); | |
+ /** | |
+ * Deinitialize format. If present, this is called whenever the muxer is being | |
+ * destroyed, regardless of whether or not the header has been written. | |
+ * | |
+ * If a trailer is being written, this is called after write_trailer(). | |
+ * | |
+ * This is called if init() fails as well. | |
+ */ | |
+ void (*deinit)(struct AVFormatContext *); | |
+ /** | |
+ * Set up any necessary bitstream filtering and extract any extra data needed | |
+ * for the global header. | |
+ * Return 0 if more packets from this stream must be checked; 1 if not. | |
+ */ | |
+ int (*check_bitstream)(struct AVFormatContext *, const AVPacket *pkt); | |
} AVOutputFormat; | |
/** | |
* @} | |
@@ -810,6 +842,8 @@ | |
*/ | |
#define AV_DISPOSITION_ATTACHED_PIC 0x0400 | |
+typedef struct AVStreamInternal AVStreamInternal; | |
+ | |
/** | |
* To specify text track kind (different from subtitles default). | |
*/ | |
@@ -968,7 +1002,7 @@ | |
/** | |
* Stream information used internally by av_find_stream_info() | |
*/ | |
-#define MAX_STD_TIMEBASES (30*12+7+6) | |
+#define MAX_STD_TIMEBASES (30*12+30+3+6) | |
struct { | |
int64_t last_dts; | |
int64_t duration_gcd; | |
@@ -1172,6 +1206,12 @@ | |
AVRational display_aspect_ratio; | |
struct FFFrac *priv_pts; | |
+ | |
+ /** | |
+ * An opaque field for libavformat internal usage. | |
+ * Must not be accessed in any way by callers. | |
+ */ | |
+ AVStreamInternal *internal; | |
} AVStream; | |
AVRational av_stream_get_r_frame_rate(const AVStream *s); | |
@@ -1363,7 +1403,7 @@ | |
* available. Never set it directly if the file_size and the | |
* duration are known as FFmpeg can compute it automatically. | |
*/ | |
- int bit_rate; | |
+ int64_t bit_rate; | |
unsigned int packet_size; | |
int max_delay; | |
@@ -1396,18 +1436,20 @@ | |
#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Don't merge side data but keep it separate. | |
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats | |
-#if FF_API_PROBESIZE_32 | |
/** | |
- * @deprecated deprecated in favor of probesize2 | |
+ * Maximum size of the data read from input for determining | |
+ * the input container format. | |
+ * Demuxing only, set by the caller before avformat_open_input(). | |
*/ | |
- unsigned int probesize; | |
+ int64_t probesize; | |
/** | |
- * @deprecated deprecated in favor of max_analyze_duration2 | |
+ * Maximum duration (in AV_TIME_BASE units) of the data read | |
+ * from input in avformat_find_stream_info(). | |
+ * Demuxing only, set by the caller before avformat_find_stream_info(). | |
+ * Can be set to 0 to let avformat choose using a heuristic. | |
*/ | |
- attribute_deprecated | |
- int max_analyze_duration; | |
-#endif | |
+ int64_t max_analyze_duration; | |
const uint8_t *key; | |
int keylen; | |
@@ -1738,7 +1780,6 @@ | |
/** | |
* User data. | |
* This is a place for some private data of the user. | |
- * Mostly usable with control_message_cb or any future callbacks in device's context. | |
*/ | |
void *opaque; | |
@@ -1754,31 +1795,6 @@ | |
int64_t output_ts_offset; | |
/** | |
- * Maximum duration (in AV_TIME_BASE units) of the data read | |
- * from input in avformat_find_stream_info(). | |
- * Demuxing only, set by the caller before avformat_find_stream_info() | |
- * via AVOptions (NO direct access). | |
- * Can be set to 0 to let avformat choose using a heuristic. | |
- */ | |
-#if FF_API_PROBESIZE_32 | |
- int64_t max_analyze_duration2; | |
-#else | |
- int64_t max_analyze_duration; | |
-#endif | |
- | |
- /** | |
- * Maximum size of the data read from input for determining | |
- * the input container format. | |
- * Demuxing only, set by the caller before avformat_open_input() | |
- * via AVOptions (NO direct access). | |
- */ | |
-#if FF_API_PROBESIZE_32 | |
- int64_t probesize2; | |
-#else | |
- int64_t probesize; | |
-#endif | |
- | |
- /** | |
* dump format separator. | |
* can be ", " or "\n " or anything else | |
* Code outside libavformat should access this field using AVOptions | |
@@ -1794,6 +1810,7 @@ | |
*/ | |
enum AVCodecID data_codec_id; | |
+#if FF_API_OLD_OPEN_CALLBACKS | |
/** | |
* Called to open further IO contexts when needed for demuxing. | |
* | |
@@ -1808,8 +1825,47 @@ | |
* @See av_format_set_open_cb() | |
* | |
* Demuxing: Set by user. | |
+ * | |
+ * @deprecated Use io_open and io_close. | |
*/ | |
+ attribute_deprecated | |
int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options); | |
+#endif | |
+ | |
+ /** | |
+ * ',' separated list of allowed protocols. | |
+ * - encoding: unused | |
+ * - decoding: set by user through AVOptions (NO direct access) | |
+ */ | |
+ char *protocol_whitelist; | |
+ | |
+ /* | |
+ * A callback for opening new IO streams. | |
+ * | |
+ * Certain muxers or demuxers (e.g. for various playlist-based formats) need | |
+ * to open additional files during muxing or demuxing. This callback allows | |
+ * the caller to provide custom IO in such cases. | |
+ * | |
+ * @param s the format context | |
+ * @param pb on success, the newly opened IO context should be returned here | |
+ * @param url the url to open | |
+ * @param flags a combination of AVIO_FLAG_* | |
+ * @param options a dictionary of additional options, with the same | |
+ * semantics as in avio_open2() | |
+ * @return 0 on success, a negative AVERROR code on failure | |
+ * | |
+ * @note Certain muxers and demuxers do nesting, i.e. they open one or more | |
+ * additional internal format contexts. Thus the AVFormatContext pointer | |
+ * passed to this callback may be different from the one facing the caller. | |
+ * It will, however, have the same 'opaque' field. | |
+ */ | |
+ int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, | |
+ int flags, AVDictionary **options); | |
+ | |
+ /** | |
+ * A callback for closing the streams opened with AVFormatContext.io_open(). | |
+ */ | |
+ void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); | |
} AVFormatContext; | |
int av_format_get_probe_score(const AVFormatContext *s); | |
@@ -1827,8 +1883,10 @@ | |
void av_format_set_opaque(AVFormatContext *s, void *opaque); | |
av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s); | |
void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); | |
-AVOpenCallback av_format_get_open_cb(const AVFormatContext *s); | |
-void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback); | |
+#if FF_API_OLD_OPEN_CALLBACKS | |
+attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s); | |
+attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback); | |
+#endif | |
/** | |
* This function will cause global side data to be injected in the next packet | |
@@ -1958,6 +2016,16 @@ | |
AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); | |
/** | |
+ * Allocate new information from stream. | |
+ * | |
+ * @param stream stream | |
+ * @param type desired side information type | |
+ * @param size side information size | |
+ * @return pointer to fresh allocated data or NULL otherwise | |
+ */ | |
+uint8_t *av_stream_new_side_data(AVStream *stream, | |
+ enum AVPacketSideDataType type, int size); | |
+/** | |
* Get side information from stream. | |
* | |
* @param stream stream | |
@@ -2044,7 +2112,7 @@ | |
* | |
* @param pb the bytestream to probe | |
* @param fmt the input format is put here | |
- * @param filename the filename of the stream | |
+ * @param url the url of the stream | |
* @param logctx the log context | |
* @param offset the offset within the bytestream to probe from | |
* @param max_probe_size the maximum probe buffer size (zero for default) | |
@@ -2053,14 +2121,14 @@ | |
* AVERROR code otherwise | |
*/ | |
int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, | |
- const char *filename, void *logctx, | |
+ const char *url, void *logctx, | |
unsigned int offset, unsigned int max_probe_size); | |
/** | |
* Like av_probe_input_buffer2() but returns 0 on success | |
*/ | |
int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, | |
- const char *filename, void *logctx, | |
+ const char *url, void *logctx, | |
unsigned int offset, unsigned int max_probe_size); | |
/** | |
@@ -2071,7 +2139,7 @@ | |
* May be a pointer to NULL, in which case an AVFormatContext is allocated by this | |
* function and written into ps. | |
* Note that a user-supplied AVFormatContext will be freed on failure. | |
- * @param filename Name of the stream to open. | |
+ * @param url URL of the stream to open. | |
* @param fmt If non-NULL, this parameter forces a specific input format. | |
* Otherwise the format is autodetected. | |
* @param options A dictionary filled with AVFormatContext and demuxer-private options. | |
@@ -2082,7 +2150,7 @@ | |
* | |
* @note If you want to use custom IO, preallocate the format context and set its pb field. | |
*/ | |
-int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options); | |
+int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options); | |
attribute_deprecated | |
int av_demuxer_open(AVFormatContext *ic); | |
@@ -2122,6 +2190,8 @@ | |
*/ | |
AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s); | |
+void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx); | |
+ | |
/** | |
* Find the "best" stream in the file. | |
* The best stream is determined according to various heuristics as the most | |
@@ -2164,7 +2234,7 @@ | |
* If pkt->buf is NULL, then the packet is valid until the next | |
* av_read_frame() or until avformat_close_input(). Otherwise the packet | |
* is valid indefinitely. In both cases the packet must be freed with | |
- * av_free_packet when it is no longer needed. For video, the packet contains | |
+ * av_packet_unref when it is no longer needed. For video, the packet contains | |
* exactly one frame. For audio, it contains an integer number of frames if each | |
* frame has a known fixed size (e.g. PCM or ADPCM data). If the audio frames | |
* have a variable size (e.g. MPEG audio), then it contains one frame. | |
@@ -2289,6 +2359,7 @@ | |
* | |
* @see av_opt_find, av_dict_set, avio_open, av_oformat_next. | |
*/ | |
+av_warn_unused_result | |
int avformat_write_header(AVFormatContext *s, AVDictionary **options); | |
/** | |
@@ -2313,10 +2384,17 @@ | |
* <br> | |
* Packet's @ref AVPacket.stream_index "stream_index" field must be | |
* set to the index of the corresponding stream in @ref | |
- * AVFormatContext.streams "s->streams". It is very strongly | |
- * recommended that timing information (@ref AVPacket.pts "pts", @ref | |
- * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to | |
- * correct values. | |
+ * AVFormatContext.streams "s->streams". | |
+ * <br> | |
+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts") | |
+ * must be set to correct values in the stream's timebase (unless the | |
+ * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then | |
+ * they can be set to AV_NOPTS_VALUE). | |
+ * The dts for subsequent packets passed to this function must be strictly | |
+ * increasing when compared in their respective timebases (unless the | |
+ * output format is flagged with the AVFMT_TS_NONSTRICT, then they | |
+ * merely have to be nondecreasing). @ref AVPacket.duration | |
+ * "duration") should also be set if known. | |
* @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush | |
* | |
* @see av_interleaved_write_frame() | |
@@ -2346,10 +2424,16 @@ | |
* <br> | |
* Packet's @ref AVPacket.stream_index "stream_index" field must be | |
* set to the index of the corresponding stream in @ref | |
- * AVFormatContext.streams "s->streams". It is very strongly | |
- * recommended that timing information (@ref AVPacket.pts "pts", @ref | |
- * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to | |
- * correct values. | |
+ * AVFormatContext.streams "s->streams". | |
+ * <br> | |
+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts") | |
+ * must be set to correct values in the stream's timebase (unless the | |
+ * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then | |
+ * they can be set to AV_NOPTS_VALUE). | |
+ * The dts for subsequent packets in one stream must be strictly | |
+ * increasing (unless the output format is flagged with the | |
+ * AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing). | |
+ * @ref AVPacket.duration "duration") should also be set if known. | |
* | |
* @return 0 on success, a negative AVERROR on error. Libavformat will always | |
* take care of freeing the packet, even if this function fails. | |
@@ -2756,6 +2840,17 @@ | |
int avformat_queue_attached_pictures(AVFormatContext *s); | |
+/** | |
+ * Apply a list of bitstream filters to a packet. | |
+ * | |
+ * @param codec AVCodecContext, usually from an AVStream | |
+ * @param pkt the packet to apply filters to | |
+ * @param bsfc a NULL-terminated list of filters to apply | |
+ * @return >=0 on success; | |
+ * AVERROR code on failure | |
+ */ | |
+int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, | |
+ AVBitStreamFilterContext *bsfc); | |
/** | |
* @} | |
diff -ur ffmpeg-2.8.3/libavformat/avio.h ffmpeg-3.0.1/libavformat/avio.h | |
--- ffmpeg-2.8.3/libavformat/avio.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavformat/avio.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -122,6 +122,53 @@ | |
* to any av_opt_* functions in that case. | |
*/ | |
const AVClass *av_class; | |
+ | |
+ /* | |
+ * The following shows the relationship between buffer, buf_ptr, buf_end, buf_size, | |
+ * and pos, when reading and when writing (since AVIOContext is used for both): | |
+ * | |
+ ********************************************************************************** | |
+ * READING | |
+ ********************************************************************************** | |
+ * | |
+ * | buffer_size | | |
+ * |---------------------------------------| | |
+ * | | | |
+ * | |
+ * buffer buf_ptr buf_end | |
+ * +---------------+-----------------------+ | |
+ * |/ / / / / / / /|/ / / / / / /| | | |
+ * read buffer: |/ / consumed / | to be read /| | | |
+ * |/ / / / / / / /|/ / / / / / /| | | |
+ * +---------------+-----------------------+ | |
+ * | |
+ * pos | |
+ * +-------------------------------------------+-----------------+ | |
+ * input file: | | | | |
+ * +-------------------------------------------+-----------------+ | |
+ * | |
+ * | |
+ ********************************************************************************** | |
+ * WRITING | |
+ ********************************************************************************** | |
+ * | |
+ * | buffer_size | | |
+ * |-------------------------------| | |
+ * | | | |
+ * | |
+ * buffer buf_ptr buf_end | |
+ * +-------------------+-----------+ | |
+ * |/ / / / / / / / / /| | | |
+ * write buffer: | / to be flushed / | | | |
+ * |/ / / / / / / / / /| | | |
+ * +-------------------+-----------+ | |
+ * | |
+ * pos | |
+ * +--------------------------+-----------------------------------+ | |
+ * output file: | | | | |
+ * +--------------------------+-----------------------------------+ | |
+ * | |
+ */ | |
unsigned char *buffer; /**< Start of the buffer. */ | |
int buffer_size; /**< Maximum buffer size */ | |
unsigned char *buf_ptr; /**< Current position in the buffer */ | |
@@ -202,6 +249,11 @@ | |
* This is current internal only, do not use from outside. | |
*/ | |
int short_seek_threshold; | |
+ | |
+ /** | |
+ * ',' separated list of allowed protocols. | |
+ */ | |
+ const char *protocol_whitelist; | |
} AVIOContext; | |
/* unbuffered I/O */ | |
@@ -411,7 +463,7 @@ | |
int url_feof(AVIOContext *s); | |
#endif | |
-/** @warning currently size is limited */ | |
+/** @warning Writes up to 4 KiB per call */ | |
int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); | |
/** | |
diff -ur ffmpeg-2.8.3/libavformat/version.h ffmpeg-3.0.1/libavformat/version.h | |
--- ffmpeg-2.8.3/libavformat/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavformat/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -29,9 +29,9 @@ | |
#include "libavutil/version.h" | |
-#define LIBAVFORMAT_VERSION_MAJOR 56 | |
-#define LIBAVFORMAT_VERSION_MINOR 40 | |
-#define LIBAVFORMAT_VERSION_MICRO 101 | |
+#define LIBAVFORMAT_VERSION_MAJOR 57 | |
+#define LIBAVFORMAT_VERSION_MINOR 25 | |
+#define LIBAVFORMAT_VERSION_MICRO 100 | |
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ | |
LIBAVFORMAT_VERSION_MINOR, \ | |
@@ -54,19 +54,25 @@ | |
* | |
*/ | |
#ifndef FF_API_LAVF_BITEXACT | |
-#define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 57) | |
+#define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_LAVF_FRAC | |
-#define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 57) | |
+#define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_LAVF_CODEC_TB | |
-#define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 57) | |
+#define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_URL_FEOF | |
-#define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57) | |
+#define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 58) | |
#endif | |
-#ifndef FF_API_PROBESIZE_32 | |
-#define FF_API_PROBESIZE_32 (LIBAVFORMAT_VERSION_MAJOR < 57) | |
+#ifndef FF_API_LAVF_FMT_RAWPICTURE | |
+#define FF_API_LAVF_FMT_RAWPICTURE (LIBAVFORMAT_VERSION_MAJOR < 58) | |
+#endif | |
+#ifndef FF_API_COMPUTE_PKT_FIELDS2 | |
+#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 58) | |
+#endif | |
+#ifndef FF_API_OLD_OPEN_CALLBACKS | |
+#define FF_API_OLD_OPEN_CALLBACKS (LIBAVFORMAT_VERSION_MAJOR < 58) | |
#endif | |
#ifndef FF_API_R_FRAME_RATE | |
diff -ur ffmpeg-2.8.3/libavresample/avresample.h ffmpeg-3.0.1/libavresample/avresample.h | |
--- ffmpeg-2.8.3/libavresample/avresample.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavresample/avresample.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -167,9 +167,13 @@ | |
/** | |
* Initialize AVAudioResampleContext. | |
* @note The context must be configured using the AVOption API. | |
+ * @note The fields "in_channel_layout", "out_channel_layout", | |
+ * "in_sample_rate", "out_sample_rate", "in_sample_fmt", | |
+ * "out_sample_fmt" must be set. | |
* | |
* @see av_opt_set_int() | |
* @see av_opt_set_dict() | |
+ * @see av_get_default_channel_layout() | |
* | |
* @param avr audio resample context | |
* @return 0 on success, negative AVERROR code on failure | |
@@ -373,8 +377,9 @@ | |
* output FIFO | |
*/ | |
int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, | |
- int out_plane_size, int out_samples, uint8_t **input, | |
- int in_plane_size, int in_samples); | |
+ int out_plane_size, int out_samples, | |
+ uint8_t * const *input, int in_plane_size, | |
+ int in_samples); | |
/** | |
* Return the number of samples currently in the resampling delay buffer. | |
diff -ur ffmpeg-2.8.3/libavresample/version.h ffmpeg-3.0.1/libavresample/version.h | |
--- ffmpeg-2.8.3/libavresample/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavresample/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -27,8 +27,8 @@ | |
#include "libavutil/version.h" | |
-#define LIBAVRESAMPLE_VERSION_MAJOR 2 | |
-#define LIBAVRESAMPLE_VERSION_MINOR 1 | |
+#define LIBAVRESAMPLE_VERSION_MAJOR 3 | |
+#define LIBAVRESAMPLE_VERSION_MINOR 0 | |
#define LIBAVRESAMPLE_VERSION_MICRO 0 | |
#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \ | |
@@ -47,8 +47,4 @@ | |
* the public API and may change, break or disappear at any time. | |
*/ | |
-#ifndef FF_API_RESAMPLE_CLOSE_OPEN | |
-#define FF_API_RESAMPLE_CLOSE_OPEN (LIBAVRESAMPLE_VERSION_MAJOR < 3) | |
-#endif | |
- | |
#endif /* AVRESAMPLE_VERSION_H */ | |
Only in ffmpeg-3.0.1/libavutil: aes_ctr.h | |
diff -ur ffmpeg-2.8.3/libavutil/attributes.h ffmpeg-3.0.1/libavutil/attributes.h | |
--- ffmpeg-2.8.3/libavutil/attributes.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/attributes.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -28,8 +28,10 @@ | |
#ifdef __GNUC__ | |
# define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y)) | |
+# define AV_GCC_VERSION_AT_MOST(x,y) (__GNUC__ < (x) || __GNUC__ == (x) && __GNUC_MINOR__ <= (y)) | |
#else | |
# define AV_GCC_VERSION_AT_LEAST(x,y) 0 | |
+# define AV_GCC_VERSION_AT_MOST(x,y) 0 | |
#endif | |
#ifndef av_always_inline | |
@@ -50,6 +52,12 @@ | |
#endif | |
#endif | |
+#if AV_GCC_VERSION_AT_LEAST(3,4) | |
+# define av_warn_unused_result __attribute__((warn_unused_result)) | |
+#else | |
+# define av_warn_unused_result | |
+#endif | |
+ | |
#if AV_GCC_VERSION_AT_LEAST(3,1) | |
# define av_noinline __attribute__((noinline)) | |
#elif defined(_MSC_VER) | |
Only in ffmpeg-2.8.3/libavutil: audioconvert.h | |
diff -ur ffmpeg-2.8.3/libavutil/audio_fifo.h ffmpeg-3.0.1/libavutil/audio_fifo.h | |
--- ffmpeg-2.8.3/libavutil/audio_fifo.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/audio_fifo.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -73,6 +73,7 @@ | |
* @param nb_samples new allocation size, in samples | |
* @return 0 if OK, or negative AVERROR code on failure | |
*/ | |
+av_warn_unused_result | |
int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples); | |
/** | |
diff -ur ffmpeg-2.8.3/libavutil/avstring.h ffmpeg-3.0.1/libavutil/avstring.h | |
--- ffmpeg-2.8.3/libavutil/avstring.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/avstring.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -203,17 +203,27 @@ | |
/** | |
* Locale-independent conversion of ASCII isdigit. | |
*/ | |
-av_const int av_isdigit(int c); | |
+static inline av_const int av_isdigit(int c) | |
+{ | |
+ return c >= '0' && c <= '9'; | |
+} | |
/** | |
* Locale-independent conversion of ASCII isgraph. | |
*/ | |
-av_const int av_isgraph(int c); | |
+static inline av_const int av_isgraph(int c) | |
+{ | |
+ return c > 32 && c < 127; | |
+} | |
/** | |
* Locale-independent conversion of ASCII isspace. | |
*/ | |
-av_const int av_isspace(int c); | |
+static inline av_const int av_isspace(int c) | |
+{ | |
+ return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || | |
+ c == '\v'; | |
+} | |
/** | |
* Locale-independent conversion of ASCII characters to uppercase. | |
@@ -238,7 +248,11 @@ | |
/** | |
* Locale-independent conversion of ASCII isxdigit. | |
*/ | |
-av_const int av_isxdigit(int c); | |
+static inline av_const int av_isxdigit(int c) | |
+{ | |
+ c = av_tolower(c); | |
+ return av_isdigit(c) || (c >= 'a' && c <= 'f'); | |
+} | |
/** | |
* Locale-independent case-insensitive compare. | |
@@ -270,6 +284,11 @@ | |
/** | |
* Match instances of a name in a comma-separated list of names. | |
+ * List entries are checked from the start to the end of the names list, | |
+ * the first match ends further processing. If an entry prefixed with '-' | |
+ * matches, then 0 is returned. The "ALL" list entry is considered to | |
+ * match all names. | |
+ * | |
* @param name Name to look for. | |
* @param names List of names. | |
* @return 1 on match, 0 otherwise. | |
@@ -300,14 +319,14 @@ | |
* characters lists, except it is guaranteed to use the exact same list | |
* of whitespace characters as the rest of libavutil. | |
*/ | |
-#define AV_ESCAPE_FLAG_WHITESPACE 0x01 | |
+#define AV_ESCAPE_FLAG_WHITESPACE (1 << 0) | |
/** | |
* Escape only specified special characters. | |
* Without this flag, escape also any characters that may be considered | |
* special by av_get_token(), such as the single quote. | |
*/ | |
-#define AV_ESCAPE_FLAG_STRICT 0x02 | |
+#define AV_ESCAPE_FLAG_STRICT (1 << 1) | |
/** | |
* Escape string in src, and put the escaped string in an allocated | |
@@ -325,6 +344,7 @@ | |
* @return the length of the allocated string, or a negative error code in case of error | |
* @see av_bprint_escape() | |
*/ | |
+av_warn_unused_result | |
int av_escape(char **dst, const char *src, const char *special_chars, | |
enum AVEscapeMode mode, int flags); | |
@@ -364,6 +384,7 @@ | |
* @return >= 0 in case a sequence was successfully read, a negative | |
* value in case of invalid sequence | |
*/ | |
+av_warn_unused_result | |
int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end, | |
unsigned int flags); | |
diff -ur ffmpeg-2.8.3/libavutil/blowfish.h ffmpeg-3.0.1/libavutil/blowfish.h | |
--- ffmpeg-2.8.3/libavutil/blowfish.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/blowfish.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -23,7 +23,6 @@ | |
#define AVUTIL_BLOWFISH_H | |
#include <stdint.h> | |
-#include "version.h" | |
/** | |
* @defgroup lavu_blowfish Blowfish | |
diff -ur ffmpeg-2.8.3/libavutil/cast5.h ffmpeg-3.0.1/libavutil/cast5.h | |
--- ffmpeg-2.8.3/libavutil/cast5.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/cast5.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -48,6 +48,7 @@ | |
* @param ctx an AVCAST5 context | |
* @param key a key of 5,6,...16 bytes used for encryption/decryption | |
* @param key_bits number of keybits: possible are 40,48,...,128 | |
+ * @return 0 on success, less than 0 on failure | |
*/ | |
int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits); | |
diff -ur ffmpeg-2.8.3/libavutil/common.h ffmpeg-3.0.1/libavutil/common.h | |
--- ffmpeg-2.8.3/libavutil/common.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/common.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -40,6 +40,7 @@ | |
#include <string.h> | |
#include "attributes.h" | |
+#include "macros.h" | |
#include "version.h" | |
#include "libavutil/avconfig.h" | |
@@ -53,9 +54,12 @@ | |
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) | |
/* assume b>0 */ | |
#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) | |
-/* assume a>0 and b>0 */ | |
-#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ | |
+/* Fast a/(1<<b) rounded toward +inf. Assume a>=0 and b>=0 */ | |
+#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ | |
: ((a) + (1<<(b)) - 1) >> (b)) | |
+/* Backwards compat. */ | |
+#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT | |
+ | |
#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) | |
#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b)) | |
@@ -94,17 +98,9 @@ | |
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) | |
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) | |
-#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) | |
/* misc math functions */ | |
-/** | |
- * Reverse the order of the bits of an 8-bits unsigned integer. | |
- */ | |
-#if FF_API_AV_REVERSE | |
-extern attribute_deprecated const uint8_t av_reverse[256]; | |
-#endif | |
- | |
#ifdef HAVE_AV_CONFIG_H | |
# include "config.h" | |
# include "intmath.h" | |
@@ -218,7 +214,7 @@ | |
*/ | |
static av_always_inline av_const int av_clip_intp2_c(int a, int p) | |
{ | |
- if ((a + (1 << p)) & ~((2 << p) - 1)) | |
+ if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) | |
return (a >> 31) ^ ((1 << p) - 1); | |
else | |
return a; | |
@@ -338,6 +334,11 @@ | |
return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32)); | |
} | |
+static av_always_inline av_const int av_parity_c(uint32_t v) | |
+{ | |
+ return av_popcount(v) & 1; | |
+} | |
+ | |
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24)) | |
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) | |
@@ -358,13 +359,13 @@ | |
* to prevent undefined results. | |
*/ | |
#define GET_UTF8(val, GET_BYTE, ERROR)\ | |
- val= GET_BYTE;\ | |
+ val= (GET_BYTE);\ | |
{\ | |
uint32_t top = (val & 128) >> 1;\ | |
if ((val & 0xc0) == 0x80 || val >= 0xFE)\ | |
ERROR\ | |
while (val & top) {\ | |
- int tmp= GET_BYTE - 128;\ | |
+ int tmp= (GET_BYTE) - 128;\ | |
if(tmp>>6)\ | |
ERROR\ | |
val= (val<<6) + tmp;\ | |
@@ -524,3 +525,6 @@ | |
#ifndef av_popcount64 | |
# define av_popcount64 av_popcount64_c | |
#endif | |
+#ifndef av_parity | |
+# define av_parity av_parity_c | |
+#endif | |
diff -ur ffmpeg-2.8.3/libavutil/cpu.h ffmpeg-3.0.1/libavutil/cpu.h | |
--- ffmpeg-2.8.3/libavutil/cpu.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/cpu.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -42,15 +42,12 @@ | |
#define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower | |
#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions | |
#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions | |
+#define AV_CPU_FLAG_AESNI 0x80000 ///< Advanced Encryption Standard functions | |
#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used | |
#define AV_CPU_FLAG_AVXSLOW 0x8000000 ///< AVX supported, but slow when using YMM registers (e.g. Bulldozer) | |
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions | |
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions | |
-// #if LIBAVUTIL_VERSION_MAJOR <52 | |
-#define AV_CPU_FLAG_CMOV 0x1001000 ///< supports cmov instruction | |
-// #else | |
-// #define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction | |
-// #endif | |
+#define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction | |
#define AV_CPU_FLAG_AVX2 0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used | |
#define AV_CPU_FLAG_FMA3 0x10000 ///< Haswell FMA3 functions | |
#define AV_CPU_FLAG_BMI1 0x20000 ///< Bit Manipulation Instruction Set 1 | |
@@ -67,6 +64,7 @@ | |
#define AV_CPU_FLAG_VFPV3 (1 << 4) | |
#define AV_CPU_FLAG_NEON (1 << 5) | |
#define AV_CPU_FLAG_ARMV8 (1 << 6) | |
+#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations | |
#define AV_CPU_FLAG_SETEND (1 <<16) | |
/** | |
diff -ur ffmpeg-2.8.3/libavutil/crc.h ffmpeg-3.0.1/libavutil/crc.h | |
--- ffmpeg-2.8.3/libavutil/crc.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/crc.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -24,6 +24,7 @@ | |
#include <stdint.h> | |
#include <stddef.h> | |
#include "attributes.h" | |
+#include "version.h" | |
/** | |
* @defgroup lavu_crc32 CRC32 | |
@@ -40,7 +41,11 @@ | |
AV_CRC_32_IEEE, | |
AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */ | |
AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */ | |
+#if FF_API_CRC_BIG_TABLE | |
AV_CRC_24_IEEE = 12, | |
+#else | |
+ AV_CRC_24_IEEE, | |
+#endif /* FF_API_CRC_BIG_TABLE */ | |
AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */ | |
}AVCRCId; | |
Only in ffmpeg-3.0.1/libavutil: des.h | |
diff -ur ffmpeg-2.8.3/libavutil/dict.h ffmpeg-3.0.1/libavutil/dict.h | |
--- ffmpeg-2.8.3/libavutil/dict.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/dict.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -162,8 +162,10 @@ | |
* @param src pointer to source AVDictionary struct | |
* @param flags flags to use when setting entries in *dst | |
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag | |
+ * @return 0 on success, negative AVERROR code on failure. If dst was allocated | |
+ * by this function, callers should free the associated memory. | |
*/ | |
-void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags); | |
+int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags); | |
/** | |
* Free all the memory allocated for an AVDictionary struct | |
diff -ur ffmpeg-2.8.3/libavutil/eval.h ffmpeg-3.0.1/libavutil/eval.h | |
--- ffmpeg-2.8.3/libavutil/eval.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/eval.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -102,7 +102,7 @@ | |
* @param numstr a string representing a number, may contain one of | |
* the International System number postfixes, for example 'K', 'M', | |
* 'G'. If 'i' is appended after the postfix, powers of 2 are used | |
- * instead of powers of 10. The 'B' postfix multiplies the value for | |
+ * instead of powers of 10. The 'B' postfix multiplies the value by | |
* 8, and can be appended after another postfix or used alone. This | |
* allows using for example 'KB', 'MiB', 'G' and 'B' as postfix. | |
* @param tail if non-NULL puts here the pointer to the char next | |
diff -ur ffmpeg-2.8.3/libavutil/ffversion.h ffmpeg-3.0.1/libavutil/ffversion.h | |
--- ffmpeg-2.8.3/libavutil/ffversion.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/ffversion.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -1,4 +1,5 @@ | |
+/* Automatically generated by version.sh, do not manually edit! */ | |
#ifndef AVUTIL_FFVERSION_H | |
#define AVUTIL_FFVERSION_H | |
-#define FFMPEG_VERSION "2.8.3" | |
+#define FFMPEG_VERSION "3.0.1" | |
#endif /* AVUTIL_FFVERSION_H */ | |
diff -ur ffmpeg-2.8.3/libavutil/fifo.h ffmpeg-3.0.1/libavutil/fifo.h | |
--- ffmpeg-2.8.3/libavutil/fifo.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/fifo.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -84,6 +84,17 @@ | |
int av_fifo_space(const AVFifoBuffer *f); | |
/** | |
+ * Feed data at specific position from an AVFifoBuffer to a user-supplied callback. | |
+ * Similar as av_fifo_gereric_read but without discarding data. | |
+ * @param f AVFifoBuffer to read from | |
+ * @param offset offset from current read position | |
+ * @param buf_size number of bytes to read | |
+ * @param func generic read function | |
+ * @param dest data destination | |
+ */ | |
+int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int)); | |
+ | |
+/** | |
* Feed data from an AVFifoBuffer to a user-supplied callback. | |
* Similar as av_fifo_gereric_read but without discarding data. | |
* @param f AVFifoBuffer to read from | |
diff -ur ffmpeg-2.8.3/libavutil/file.h ffmpeg-3.0.1/libavutil/file.h | |
--- ffmpeg-2.8.3/libavutil/file.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/file.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -40,6 +40,7 @@ | |
* @return a non negative number in case of success, a negative value | |
* corresponding to an AVERROR error code in case of failure | |
*/ | |
+av_warn_unused_result | |
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, | |
int log_offset, void *log_ctx); | |
diff -ur ffmpeg-2.8.3/libavutil/frame.h ffmpeg-3.0.1/libavutil/frame.h | |
--- ffmpeg-2.8.3/libavutil/frame.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/frame.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -106,12 +106,22 @@ | |
* @endcode | |
*/ | |
AV_FRAME_DATA_SKIP_SAMPLES, | |
- | |
/** | |
* This side data must be associated with an audio frame and corresponds to | |
* enum AVAudioServiceType defined in avcodec.h. | |
*/ | |
AV_FRAME_DATA_AUDIO_SERVICE_TYPE, | |
+ /** | |
+ * Mastering display metadata associated with a video frame. The payload is | |
+ * an AVMasteringDisplayMetadata type and contains information about the | |
+ * mastering display color volume. | |
+ */ | |
+ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA, | |
+ /** | |
+ * The GOP timecode in 25 bit timecode format. Data format is 64-bit integer. | |
+ * This is set on the first frame of a GOP that has a temporal reference of 0. | |
+ */ | |
+ AV_FRAME_DATA_GOP_TIMECODE | |
}; | |
enum AVActiveFormatDescription { | |
@@ -241,11 +251,6 @@ | |
*/ | |
enum AVPictureType pict_type; | |
-#if FF_API_AVFRAME_LAVC | |
- attribute_deprecated | |
- uint8_t *base[AV_NUM_DATA_POINTERS]; | |
-#endif | |
- | |
/** | |
* Sample aspect ratio for the video frame, 0/1 if unknown/unspecified. | |
*/ | |
@@ -282,77 +287,17 @@ | |
*/ | |
int quality; | |
-#if FF_API_AVFRAME_LAVC | |
- attribute_deprecated | |
- int reference; | |
- | |
- /** | |
- * QP table | |
- */ | |
- attribute_deprecated | |
- int8_t *qscale_table; | |
- /** | |
- * QP store stride | |
- */ | |
- attribute_deprecated | |
- int qstride; | |
- | |
- attribute_deprecated | |
- int qscale_type; | |
- | |
- /** | |
- * mbskip_table[mb]>=1 if MB didn't change | |
- * stride= mb_width = (width+15)>>4 | |
- */ | |
- attribute_deprecated | |
- uint8_t *mbskip_table; | |
- | |
- /** | |
- * motion vector table | |
- * @code | |
- * example: | |
- * int mv_sample_log2= 4 - motion_subsample_log2; | |
- * int mb_width= (width+15)>>4; | |
- * int mv_stride= (mb_width << mv_sample_log2) + 1; | |
- * motion_val[direction][x + y*mv_stride][0->mv_x, 1->mv_y]; | |
- * @endcode | |
- */ | |
- int16_t (*motion_val[2])[2]; | |
- | |
- /** | |
- * macroblock type table | |
- * mb_type_base + mb_width + 2 | |
- */ | |
- attribute_deprecated | |
- uint32_t *mb_type; | |
- | |
- /** | |
- * DCT coefficients | |
- */ | |
- attribute_deprecated | |
- short *dct_coeff; | |
- | |
- /** | |
- * motion reference frame index | |
- * the order in which these are stored can depend on the codec. | |
- */ | |
- attribute_deprecated | |
- int8_t *ref_index[2]; | |
-#endif | |
- | |
/** | |
* for some private data of the user | |
*/ | |
void *opaque; | |
+#if FF_API_ERROR_FRAME | |
/** | |
- * error | |
+ * @deprecated unused | |
*/ | |
- uint64_t error[AV_NUM_DATA_POINTERS]; | |
- | |
-#if FF_API_AVFRAME_LAVC | |
attribute_deprecated | |
- int type; | |
+ uint64_t error[AV_NUM_DATA_POINTERS]; | |
#endif | |
/** | |
@@ -376,17 +321,6 @@ | |
*/ | |
int palette_has_changed; | |
-#if FF_API_AVFRAME_LAVC | |
- attribute_deprecated | |
- int buffer_hints; | |
- | |
- /** | |
- * Pan scan. | |
- */ | |
- attribute_deprecated | |
- struct AVPanScan *pan_scan; | |
-#endif | |
- | |
/** | |
* reordered opaque 64bit (generally an integer or a double precision float | |
* PTS but can be anything). | |
@@ -398,24 +332,6 @@ | |
*/ | |
int64_t reordered_opaque; | |
-#if FF_API_AVFRAME_LAVC | |
- /** | |
- * @deprecated this field is unused | |
- */ | |
- attribute_deprecated void *hwaccel_picture_private; | |
- | |
- attribute_deprecated | |
- struct AVCodecContext *owner; | |
- attribute_deprecated | |
- void *thread_opaque; | |
- | |
- /** | |
- * log2 of the size of the block which a single vector in motion_val represents: | |
- * (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2) | |
- */ | |
- uint8_t motion_subsample_log2; | |
-#endif | |
- | |
/** | |
* Sample rate of the audio data. | |
*/ | |
@@ -574,10 +490,28 @@ | |
*/ | |
int pkt_size; | |
+#if FF_API_FRAME_QP | |
+ /** | |
+ * QP table | |
+ * Not to be accessed directly from outside libavutil | |
+ */ | |
+ attribute_deprecated | |
+ int8_t *qscale_table; | |
+ /** | |
+ * QP store stride | |
+ * Not to be accessed directly from outside libavutil | |
+ */ | |
+ attribute_deprecated | |
+ int qstride; | |
+ | |
+ attribute_deprecated | |
+ int qscale_type; | |
+ | |
/** | |
* Not to be accessed directly from outside libavutil | |
*/ | |
AVBufferRef *qp_table_buf; | |
+#endif | |
} AVFrame; | |
/** | |
@@ -604,8 +538,10 @@ | |
int av_frame_get_pkt_size(const AVFrame *frame); | |
void av_frame_set_pkt_size(AVFrame *frame, int val); | |
AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame); | |
+#if FF_API_FRAME_QP | |
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type); | |
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type); | |
+#endif | |
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame); | |
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val); | |
enum AVColorRange av_frame_get_color_range(const AVFrame *frame); | |
diff -ur ffmpeg-2.8.3/libavutil/hmac.h ffmpeg-3.0.1/libavutil/hmac.h | |
--- ffmpeg-2.8.3/libavutil/hmac.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/hmac.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -35,10 +35,6 @@ | |
AV_HMAC_SHA1, | |
AV_HMAC_SHA224, | |
AV_HMAC_SHA256, | |
-#if FF_API_HMAC | |
- AV_HMAC_SHA224_DEPRECATED = 10, | |
- AV_HMAC_SHA256_DEPRECATED, | |
-#endif | |
AV_HMAC_SHA384 = 12, | |
AV_HMAC_SHA512, | |
}; | |
diff -ur ffmpeg-2.8.3/libavutil/macros.h ffmpeg-3.0.1/libavutil/macros.h | |
--- ffmpeg-2.8.3/libavutil/macros.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/macros.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -45,4 +45,6 @@ | |
#define AV_PRAGMA(s) _Pragma(#s) | |
+#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) | |
+ | |
#endif /* AVUTIL_MACROS_H */ | |
Only in ffmpeg-3.0.1/libavutil: mastering_display_metadata.h | |
diff -ur ffmpeg-2.8.3/libavutil/mathematics.h ffmpeg-3.0.1/libavutil/mathematics.h | |
--- ffmpeg-2.8.3/libavutil/mathematics.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/mathematics.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -77,9 +77,10 @@ | |
}; | |
/** | |
- * Return the greatest common divisor of a and b. | |
- * If both a and b are 0 or either or both are <0 then behavior is | |
- * undefined. | |
+ * Compute the greatest common divisor of a and b. | |
+ * | |
+ * @return gcd of a and b up to sign; if a >= 0 and b >= 0, return value is >= 0; | |
+ * if a == 0 and b == 0, returns 0. | |
*/ | |
int64_t av_const av_gcd(int64_t a, int64_t b); | |
diff -ur ffmpeg-2.8.3/libavutil/mem.h ffmpeg-3.0.1/libavutil/mem.h | |
--- ffmpeg-2.8.3/libavutil/mem.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/mem.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -144,6 +144,7 @@ | |
* The situation is undefined according to POSIX and may crash with | |
* some libc implementations. | |
*/ | |
+av_warn_unused_result | |
int av_reallocp(void *ptr, size_t size); | |
/** | |
@@ -304,6 +305,7 @@ | |
* @return >=0 on success, negative otherwise. | |
* @see av_dynarray_add(), av_dynarray2_add() | |
*/ | |
+av_warn_unused_result | |
int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem); | |
/** | |
@@ -383,6 +385,21 @@ | |
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size); | |
/** | |
+ * Allocate a buffer, reusing the given one if large enough. | |
+ * | |
+ * All newly allocated space is initially cleared | |
+ * Contrary to av_fast_realloc the current buffer contents might not be | |
+ * preserved and on error the old buffer is freed, thus no special | |
+ * handling to avoid memleaks is necessary. | |
+ * | |
+ * @param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer | |
+ * @param size size of the buffer *ptr points to | |
+ * @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and | |
+ * *size 0 if an error occurred. | |
+ */ | |
+void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size); | |
+ | |
+/** | |
* @} | |
*/ | |
diff -ur ffmpeg-2.8.3/libavutil/motion_vector.h ffmpeg-3.0.1/libavutil/motion_vector.h | |
--- ffmpeg-2.8.3/libavutil/motion_vector.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/motion_vector.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -45,6 +45,13 @@ | |
* Currently unused. | |
*/ | |
uint64_t flags; | |
+ /** | |
+ * Motion vector | |
+ * src_x = dst_x + motion_x / motion_scale | |
+ * src_y = dst_y + motion_y / motion_scale | |
+ */ | |
+ int32_t motion_x, motion_y; | |
+ uint16_t motion_scale; | |
} AVMotionVector; | |
#endif /* AVUTIL_MOTION_VECTOR_H */ | |
Only in ffmpeg-2.8.3/libavutil: old_pix_fmts.h | |
diff -ur ffmpeg-2.8.3/libavutil/opt.h ffmpeg-3.0.1/libavutil/opt.h | |
--- ffmpeg-2.8.3/libavutil/opt.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/opt.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -236,17 +236,7 @@ | |
AV_OPT_TYPE_DURATION = MKBETAG('D','U','R',' '), | |
AV_OPT_TYPE_COLOR = MKBETAG('C','O','L','R'), | |
AV_OPT_TYPE_CHANNEL_LAYOUT = MKBETAG('C','H','L','A'), | |
-#if FF_API_OLD_AVOPTIONS | |
- FF_OPT_TYPE_FLAGS = 0, | |
- FF_OPT_TYPE_INT, | |
- FF_OPT_TYPE_INT64, | |
- FF_OPT_TYPE_DOUBLE, | |
- FF_OPT_TYPE_FLOAT, | |
- FF_OPT_TYPE_STRING, | |
- FF_OPT_TYPE_RATIONAL, | |
- FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length | |
- FF_OPT_TYPE_CONST=128, | |
-#endif | |
+ AV_OPT_TYPE_BOOL = MKBETAG('B','O','O','L'), | |
}; | |
/** | |
@@ -378,51 +368,6 @@ | |
int nb_components; | |
} AVOptionRanges; | |
- | |
-#if FF_API_OLD_AVOPTIONS | |
-/** | |
- * Set the field of obj with the given name to value. | |
- * | |
- * @param[in] obj A struct whose first element is a pointer to an | |
- * AVClass. | |
- * @param[in] name the name of the field to set | |
- * @param[in] val The value to set. If the field is not of a string | |
- * type, then the given string is parsed. | |
- * SI postfixes and some named scalars are supported. | |
- * If the field is of a numeric type, it has to be a numeric or named | |
- * scalar. Behavior with more than one scalar and +- infix operators | |
- * is undefined. | |
- * If the field is of a flags type, it has to be a sequence of numeric | |
- * scalars or named flags separated by '+' or '-'. Prefixing a flag | |
- * with '+' causes it to be set without affecting the other flags; | |
- * similarly, '-' unsets a flag. | |
- * @param[out] o_out if non-NULL put here a pointer to the AVOption | |
- * found | |
- * @param alloc this parameter is currently ignored | |
- * @return 0 if the value has been set, or an AVERROR code in case of | |
- * error: | |
- * AVERROR_OPTION_NOT_FOUND if no matching option exists | |
- * AVERROR(ERANGE) if the value is out of range | |
- * AVERROR(EINVAL) if the value is not valid | |
- * @deprecated use av_opt_set() | |
- */ | |
-attribute_deprecated | |
-int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out); | |
- | |
-attribute_deprecated const AVOption *av_set_double(void *obj, const char *name, double n); | |
-attribute_deprecated const AVOption *av_set_q(void *obj, const char *name, AVRational n); | |
-attribute_deprecated const AVOption *av_set_int(void *obj, const char *name, int64_t n); | |
- | |
-attribute_deprecated | |
-double av_get_double(void *obj, const char *name, const AVOption **o_out); | |
-attribute_deprecated | |
-AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); | |
-attribute_deprecated | |
-int64_t av_get_int(void *obj, const char *name, const AVOption **o_out); | |
-attribute_deprecated const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len); | |
-attribute_deprecated const AVOption *av_next_option(FF_CONST_AVUTIL55 void *obj, const AVOption *last); | |
-#endif | |
- | |
/** | |
* Show the obj options. | |
* | |
@@ -608,22 +553,28 @@ | |
* @} | |
*/ | |
-#define AV_OPT_SEARCH_CHILDREN 0x0001 /**< Search in possible children of the | |
- given object first. */ | |
+#define AV_OPT_SEARCH_CHILDREN (1 << 0) /**< Search in possible children of the | |
+ given object first. */ | |
/** | |
* The obj passed to av_opt_find() is fake -- only a double pointer to AVClass | |
* instead of a required pointer to a struct containing AVClass. This is | |
* useful for searching for options without needing to allocate the corresponding | |
* object. | |
*/ | |
-#define AV_OPT_SEARCH_FAKE_OBJ 0x0002 | |
+#define AV_OPT_SEARCH_FAKE_OBJ (1 << 1) | |
+ | |
+/** | |
+ * In av_opt_get, return NULL if the option has a pointer type and is set to NULL, | |
+ * rather than returning an empty string. | |
+ */ | |
+#define AV_OPT_ALLOW_NULL (1 << 2) | |
/** | |
* Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than | |
* one component for certain option types. | |
* @see AVOptionRanges for details. | |
*/ | |
-#define AV_OPT_MULTI_COMPONENT_RANGE 0x1000 | |
+#define AV_OPT_MULTI_COMPONENT_RANGE (1 << 12) | |
/** | |
* Look for an option in an object. Consider only options which | |
@@ -683,7 +634,7 @@ | |
* or NULL | |
* @return next AVOption or NULL | |
*/ | |
-const AVOption *av_opt_next(FF_CONST_AVUTIL55 void *obj, const AVOption *prev); | |
+const AVOption *av_opt_next(const void *obj, const AVOption *prev); | |
/** | |
* Iterate over AVOptions-enabled children of obj. | |
@@ -777,6 +728,10 @@ | |
*/ | |
/** | |
* @note the returned string will be av_malloc()ed and must be av_free()ed by the caller | |
+ * | |
+ * @note if AV_OPT_ALLOW_NULL is set in search_flags in av_opt_get, and the option has | |
+ * AV_OPT_TYPE_STRING or AV_OPT_TYPE_BINARY and is set to NULL, *out_val will be set | |
+ * to NULL instead of an allocated empty string. | |
*/ | |
int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val); | |
int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val); | |
@@ -835,7 +790,7 @@ | |
* @param src Object to copy into | |
* @return 0 on success, negative on error | |
*/ | |
-int av_opt_copy(void *dest, FF_CONST_AVUTIL55 void *src); | |
+int av_opt_copy(void *dest, const void *src); | |
/** | |
* Get a default list of allowed ranges for the given option. | |
diff -ur ffmpeg-2.8.3/libavutil/pixdesc.h ffmpeg-3.0.1/libavutil/pixdesc.h | |
--- ffmpeg-2.8.3/libavutil/pixdesc.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/pixdesc.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -26,35 +26,47 @@ | |
#include "attributes.h" | |
#include "pixfmt.h" | |
+#include "version.h" | |
typedef struct AVComponentDescriptor { | |
/** | |
* Which of the 4 planes contains the component. | |
*/ | |
- uint16_t plane : 2; | |
+ int plane; | |
/** | |
- * Number of elements between 2 horizontally consecutive pixels minus 1. | |
+ * Number of elements between 2 horizontally consecutive pixels. | |
* Elements are bits for bitstream formats, bytes otherwise. | |
*/ | |
- uint16_t step_minus1 : 3; | |
+ int step; | |
/** | |
- * Number of elements before the component of the first pixel plus 1. | |
+ * Number of elements before the component of the first pixel. | |
* Elements are bits for bitstream formats, bytes otherwise. | |
*/ | |
- uint16_t offset_plus1 : 3; | |
+ int offset; | |
/** | |
* Number of least significant bits that must be shifted away | |
* to get the value. | |
*/ | |
- uint16_t shift : 3; | |
+ int shift; | |
/** | |
- * Number of bits in the component minus 1. | |
+ * Number of bits in the component. | |
*/ | |
- uint16_t depth_minus1 : 4; | |
+ int depth; | |
+ | |
+#if FF_API_PLUS1_MINUS1 | |
+ /** deprecated, use step instead */ | |
+ attribute_deprecated int step_minus1; | |
+ | |
+ /** deprecated, use depth instead */ | |
+ attribute_deprecated int depth_minus1; | |
+ | |
+ /** deprecated, use offset instead */ | |
+ attribute_deprecated int offset_plus1; | |
+#endif | |
} AVComponentDescriptor; | |
/** | |
@@ -87,15 +99,20 @@ | |
* This value only refers to the chroma components. | |
*/ | |
uint8_t log2_chroma_h; | |
- uint8_t flags; | |
+ | |
+ /** | |
+ * Combination of AV_PIX_FMT_FLAG_... flags. | |
+ */ | |
+ uint64_t flags; | |
/** | |
* Parameters that describe how pixels are packed. | |
- * If the format has 2 or 4 components, then alpha is last. | |
* If the format has 1 or 2 components, then luma is 0. | |
* If the format has 3 or 4 components: | |
* if the RGB flag is set then 0 is red, 1 is green and 2 is blue; | |
* otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V. | |
+ * | |
+ * If present, the Alpha channel is always the last component. | |
*/ | |
AVComponentDescriptor comp[4]; | |
@@ -155,27 +172,6 @@ | |
*/ | |
#define AV_PIX_FMT_FLAG_ALPHA (1 << 7) | |
-#if FF_API_PIX_FMT | |
-/** | |
- * @deprecated use the AV_PIX_FMT_FLAG_* flags | |
- */ | |
-#define PIX_FMT_BE AV_PIX_FMT_FLAG_BE | |
-#define PIX_FMT_PAL AV_PIX_FMT_FLAG_PAL | |
-#define PIX_FMT_BITSTREAM AV_PIX_FMT_FLAG_BITSTREAM | |
-#define PIX_FMT_HWACCEL AV_PIX_FMT_FLAG_HWACCEL | |
-#define PIX_FMT_PLANAR AV_PIX_FMT_FLAG_PLANAR | |
-#define PIX_FMT_RGB AV_PIX_FMT_FLAG_RGB | |
-#define PIX_FMT_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL | |
-#define PIX_FMT_ALPHA AV_PIX_FMT_FLAG_ALPHA | |
-#endif | |
- | |
-#if FF_API_PIX_FMT_DESC | |
-/** | |
- * The array of all the pixel format descriptors. | |
- */ | |
-extern attribute_deprecated const AVPixFmtDescriptor av_pix_fmt_descriptors[]; | |
-#endif | |
- | |
/** | |
* Read a line from an image, and write the values of the | |
* pixel format component c to dst. | |
@@ -296,8 +292,8 @@ | |
* you do check the return code! | |
* | |
* @param[in] pix_fmt the pixel format | |
- * @param[out] h_shift store log2_chroma_w | |
- * @param[out] v_shift store log2_chroma_h | |
+ * @param[out] h_shift store log2_chroma_w (horizontal/width shift) | |
+ * @param[out] v_shift store log2_chroma_h (vertical/height shift) | |
* | |
* @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format | |
*/ | |
diff -ur ffmpeg-2.8.3/libavutil/pixfmt.h ffmpeg-3.0.1/libavutil/pixfmt.h | |
--- ffmpeg-2.8.3/libavutil/pixfmt.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/pixfmt.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -178,13 +178,6 @@ | |
AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian | |
AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian | |
AV_PIX_FMT_VDA_VLD, ///< hardware decoding through VDA | |
- | |
-#ifdef AV_PIX_FMT_ABI_GIT_MASTER | |
- AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
- AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
-#endif | |
AV_PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp | |
AV_PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big-endian | |
AV_PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little-endian | |
@@ -192,15 +185,8 @@ | |
AV_PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little-endian | |
AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big-endian | |
AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little-endian | |
- | |
- /** | |
- * duplicated pixel formats for compatibility with libav. | |
- * FFmpeg supports these formats since May 8 2012 and Jan 28 2012 (commits f9ca1ac7 and 143a5c55) | |
- * Libav added them Oct 12 2012 with incompatible values (commit 6d5600e85) | |
- */ | |
- AV_PIX_FMT_YUVA422P_LIBAV, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples) | |
- AV_PIX_FMT_YUVA444P_LIBAV, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples) | |
- | |
+ AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples) | |
+ AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples) | |
AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian | |
AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian | |
AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian | |
@@ -228,16 +214,10 @@ | |
AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian | |
AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian | |
- /** | |
- * duplicated pixel formats for compatibility with libav. | |
- * FFmpeg supports these formats since Sat Sep 24 06:01:45 2011 +0200 (commits 9569a3c9f41387a8c7d1ce97d8693520477a66c3) | |
- * also see Fri Nov 25 01:38:21 2011 +0100 92afb431621c79155fcb7171d26f137eb1bee028 | |
- * Libav added them Sun Mar 16 23:05:47 2014 +0100 with incompatible values (commit 1481d24c3a0abf81e1d7a514547bd5305232be30) | |
- */ | |
- AV_PIX_FMT_RGBA64BE_LIBAV, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_RGBA64LE_LIBAV, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
- AV_PIX_FMT_BGRA64BE_LIBAV, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_BGRA64LE_LIBAV, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
+ AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
+ AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
+ AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
+ AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb | |
@@ -246,14 +226,9 @@ | |
AV_PIX_FMT_YA16BE, ///< 16bit gray, 16bit alpha (big-endian) | |
AV_PIX_FMT_YA16LE, ///< 16bit gray, 16bit alpha (little-endian) | |
- /** | |
- * duplicated pixel formats for compatibility with libav. | |
- * FFmpeg supports these formats since May 3 2013 (commit e6d4e687558d08187e7a415a7725e4b1a416f782) | |
- * Libav added them Jan 14 2015 with incompatible values (commit 0e6c7dfa650e8b0497bfa7a06394b7a462ddc33a) | |
- */ | |
- AV_PIX_FMT_GBRAP_LIBAV, ///< planar GBRA 4:4:4:4 32bpp | |
- AV_PIX_FMT_GBRAP16BE_LIBAV, ///< planar GBRA 4:4:4:4 64bpp, big-endian | |
- AV_PIX_FMT_GBRAP16LE_LIBAV, ///< planar GBRA 4:4:4:4 64bpp, little-endian | |
+ AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp | |
+ AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian | |
+ AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian | |
/** | |
* HW acceleration through QSV, data[3] contains a pointer to the | |
* mfxFrameSurface1 structure. | |
@@ -267,18 +242,10 @@ | |
AV_PIX_FMT_D3D11VA_VLD, ///< HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer | |
-#ifndef AV_PIX_FMT_ABI_GIT_MASTER | |
- AV_PIX_FMT_RGBA64BE=0x123, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
- AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian | |
- AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian | |
-#endif | |
AV_PIX_FMT_0RGB=0x123+4,///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined | |
AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined | |
AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined | |
AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined | |
- AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples) | |
- AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples) | |
AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian | |
AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian | |
@@ -296,9 +263,6 @@ | |
AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian | |
AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian | |
AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian | |
- AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp | |
- AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian | |
- AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian | |
AV_PIX_FMT_YUVJ411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range | |
AV_PIX_FMT_BAYER_BGGR8, ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */ | |
@@ -325,26 +289,12 @@ | |
AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox | |
- AV_PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions | |
+ AV_PIX_FMT_P010LE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian | |
+ AV_PIX_FMT_P010BE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian | |
-#if FF_API_PIX_FMT | |
-#include "old_pix_fmts.h" | |
-#endif | |
+ AV_PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions | |
}; | |
-#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | |
-#define AV_PIX_FMT_YUVA422P AV_PIX_FMT_YUVA422P_LIBAV | |
-#define AV_PIX_FMT_YUVA444P AV_PIX_FMT_YUVA444P_LIBAV | |
-#define AV_PIX_FMT_RGBA64BE AV_PIX_FMT_RGBA64BE_LIBAV | |
-#define AV_PIX_FMT_RGBA64LE AV_PIX_FMT_RGBA64LE_LIBAV | |
-#define AV_PIX_FMT_BGRA64BE AV_PIX_FMT_BGRA64BE_LIBAV | |
-#define AV_PIX_FMT_BGRA64LE AV_PIX_FMT_BGRA64LE_LIBAV | |
-#define AV_PIX_FMT_GBRAP AV_PIX_FMT_GBRAP_LIBAV | |
-#define AV_PIX_FMT_GBRAP16BE AV_PIX_FMT_GBRAP16BE_LIBAV | |
-#define AV_PIX_FMT_GBRAP16LE AV_PIX_FMT_GBRAP16LE_LIBAV | |
-#endif | |
- | |
- | |
#define AV_PIX_FMT_Y400A AV_PIX_FMT_GRAY8A | |
#define AV_PIX_FMT_GBR24P AV_PIX_FMT_GBRP | |
@@ -418,74 +368,25 @@ | |
#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE) | |
#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) | |
#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE) | |
- | |
- | |
-#if FF_API_PIX_FMT | |
-#define PixelFormat AVPixelFormat | |
- | |
-#define PIX_FMT_Y400A AV_PIX_FMT_Y400A | |
-#define PIX_FMT_GBR24P AV_PIX_FMT_GBR24P | |
- | |
-#define PIX_FMT_NE(be, le) AV_PIX_FMT_NE(be, le) | |
- | |
-#define PIX_FMT_RGB32 AV_PIX_FMT_RGB32 | |
-#define PIX_FMT_RGB32_1 AV_PIX_FMT_RGB32_1 | |
-#define PIX_FMT_BGR32 AV_PIX_FMT_BGR32 | |
-#define PIX_FMT_BGR32_1 AV_PIX_FMT_BGR32_1 | |
-#define PIX_FMT_0RGB32 AV_PIX_FMT_0RGB32 | |
-#define PIX_FMT_0BGR32 AV_PIX_FMT_0BGR32 | |
- | |
-#define PIX_FMT_GRAY16 AV_PIX_FMT_GRAY16 | |
-#define PIX_FMT_RGB48 AV_PIX_FMT_RGB48 | |
-#define PIX_FMT_RGB565 AV_PIX_FMT_RGB565 | |
-#define PIX_FMT_RGB555 AV_PIX_FMT_RGB555 | |
-#define PIX_FMT_RGB444 AV_PIX_FMT_RGB444 | |
-#define PIX_FMT_BGR48 AV_PIX_FMT_BGR48 | |
-#define PIX_FMT_BGR565 AV_PIX_FMT_BGR565 | |
-#define PIX_FMT_BGR555 AV_PIX_FMT_BGR555 | |
-#define PIX_FMT_BGR444 AV_PIX_FMT_BGR444 | |
- | |
-#define PIX_FMT_YUV420P9 AV_PIX_FMT_YUV420P9 | |
-#define PIX_FMT_YUV422P9 AV_PIX_FMT_YUV422P9 | |
-#define PIX_FMT_YUV444P9 AV_PIX_FMT_YUV444P9 | |
-#define PIX_FMT_YUV420P10 AV_PIX_FMT_YUV420P10 | |
-#define PIX_FMT_YUV422P10 AV_PIX_FMT_YUV422P10 | |
-#define PIX_FMT_YUV444P10 AV_PIX_FMT_YUV444P10 | |
-#define PIX_FMT_YUV420P12 AV_PIX_FMT_YUV420P12 | |
-#define PIX_FMT_YUV422P12 AV_PIX_FMT_YUV422P12 | |
-#define PIX_FMT_YUV444P12 AV_PIX_FMT_YUV444P12 | |
-#define PIX_FMT_YUV420P14 AV_PIX_FMT_YUV420P14 | |
-#define PIX_FMT_YUV422P14 AV_PIX_FMT_YUV422P14 | |
-#define PIX_FMT_YUV444P14 AV_PIX_FMT_YUV444P14 | |
-#define PIX_FMT_YUV420P16 AV_PIX_FMT_YUV420P16 | |
-#define PIX_FMT_YUV422P16 AV_PIX_FMT_YUV422P16 | |
-#define PIX_FMT_YUV444P16 AV_PIX_FMT_YUV444P16 | |
- | |
-#define PIX_FMT_RGBA64 AV_PIX_FMT_RGBA64 | |
-#define PIX_FMT_BGRA64 AV_PIX_FMT_BGRA64 | |
-#define PIX_FMT_GBRP9 AV_PIX_FMT_GBRP9 | |
-#define PIX_FMT_GBRP10 AV_PIX_FMT_GBRP10 | |
-#define PIX_FMT_GBRP12 AV_PIX_FMT_GBRP12 | |
-#define PIX_FMT_GBRP14 AV_PIX_FMT_GBRP14 | |
-#define PIX_FMT_GBRP16 AV_PIX_FMT_GBRP16 | |
-#endif | |
+#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE) | |
/** | |
* Chromaticity coordinates of the source primaries. | |
*/ | |
enum AVColorPrimaries { | |
AVCOL_PRI_RESERVED0 = 0, | |
- AVCOL_PRI_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B | |
+ AVCOL_PRI_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B | |
AVCOL_PRI_UNSPECIFIED = 2, | |
AVCOL_PRI_RESERVED = 3, | |
- AVCOL_PRI_BT470M = 4, ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20) | |
+ AVCOL_PRI_BT470M = 4, ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20) | |
- AVCOL_PRI_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM | |
- AVCOL_PRI_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC | |
- AVCOL_PRI_SMPTE240M = 7, ///< functionally identical to above | |
- AVCOL_PRI_FILM = 8, ///< colour filters using Illuminant C | |
- AVCOL_PRI_BT2020 = 9, ///< ITU-R BT2020 | |
- AVCOL_PRI_NB, ///< Not part of ABI | |
+ AVCOL_PRI_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM | |
+ AVCOL_PRI_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC | |
+ AVCOL_PRI_SMPTE240M = 7, ///< functionally identical to above | |
+ AVCOL_PRI_FILM = 8, ///< colour filters using Illuminant C | |
+ AVCOL_PRI_BT2020 = 9, ///< ITU-R BT2020 | |
+ AVCOL_PRI_SMPTEST428_1= 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ) | |
+ AVCOL_PRI_NB, ///< Not part of ABI | |
}; | |
/** | |
@@ -508,6 +409,8 @@ | |
AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC) | |
AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10 bit system | |
AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12 bit system | |
+ AVCOL_TRC_SMPTEST2084 = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems | |
+ AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1 | |
AVCOL_TRC_NB, ///< Not part of ABI | |
}; | |
Only in ffmpeg-3.0.1/libavutil: rc4.h | |
diff -ur ffmpeg-2.8.3/libavutil/threadmessage.h ffmpeg-3.0.1/libavutil/threadmessage.h | |
--- ffmpeg-2.8.3/libavutil/threadmessage.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/threadmessage.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -88,4 +88,20 @@ | |
void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq, | |
int err); | |
+/** | |
+ * Set the optional free message callback function which will be called if an | |
+ * operation is removing messages from the queue. | |
+ */ | |
+void av_thread_message_queue_set_free_func(AVThreadMessageQueue *mq, | |
+ void (*free_func)(void *msg)); | |
+ | |
+/** | |
+ * Flush the message queue | |
+ * | |
+ * This function is mostly equivalent to reading and free-ing every message | |
+ * except that it will be done in a single operation (no lock/unlock between | |
+ * reads). | |
+ */ | |
+void av_thread_message_flush(AVThreadMessageQueue *mq); | |
+ | |
#endif /* AVUTIL_THREADMESSAGE_H */ | |
Only in ffmpeg-3.0.1/libavutil: tree.h | |
diff -ur ffmpeg-2.8.3/libavutil/version.h ffmpeg-3.0.1/libavutil/version.h | |
--- ffmpeg-2.8.3/libavutil/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -37,6 +37,14 @@ | |
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) | |
/** | |
+ * Extract version components from the full ::AV_VERSION_INT int as returned | |
+ * by functions like ::avformat_version() and ::avcodec_version() | |
+ */ | |
+#define AV_VERSION_MAJOR(a) ((a) >> 16) | |
+#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8) | |
+#define AV_VERSION_MICRO(a) ((a) & 0xFF) | |
+ | |
+/** | |
* @} | |
*/ | |
@@ -55,9 +63,9 @@ | |
* @{ | |
*/ | |
-#define LIBAVUTIL_VERSION_MAJOR 54 | |
-#define LIBAVUTIL_VERSION_MINOR 31 | |
-#define LIBAVUTIL_VERSION_MICRO 100 | |
+#define LIBAVUTIL_VERSION_MAJOR 55 | |
+#define LIBAVUTIL_VERSION_MINOR 17 | |
+#define LIBAVUTIL_VERSION_MICRO 103 | |
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ | |
LIBAVUTIL_VERSION_MINOR, \ | |
@@ -84,66 +92,37 @@ | |
* @{ | |
*/ | |
-#ifndef FF_API_OLD_AVOPTIONS | |
-#define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_PIX_FMT | |
-#define FF_API_PIX_FMT (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_CONTEXT_SIZE | |
-#define FF_API_CONTEXT_SIZE (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_PIX_FMT_DESC | |
-#define FF_API_PIX_FMT_DESC (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_AV_REVERSE | |
-#define FF_API_AV_REVERSE (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_AUDIOCONVERT | |
-#define FF_API_AUDIOCONVERT (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_CPU_FLAG_MMX2 | |
-#define FF_API_CPU_FLAG_MMX2 (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_LLS_PRIVATE | |
-#define FF_API_LLS_PRIVATE (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_AVFRAME_LAVC | |
-#define FF_API_AVFRAME_LAVC (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
#ifndef FF_API_VDPAU | |
-#define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT | |
-#define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 55) | |
+#define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
#ifndef FF_API_XVMC | |
-#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 55) | |
+#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
#ifndef FF_API_OPT_TYPE_METADATA | |
-#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55) | |
+#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
#ifndef FF_API_DLOG | |
-#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 55) | |
-#endif | |
-#ifndef FF_API_HMAC | |
-#define FF_API_HMAC (LIBAVUTIL_VERSION_MAJOR < 55) | |
+#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
#ifndef FF_API_VAAPI | |
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
- | |
-#ifndef FF_CONST_AVUTIL55 | |
-#if LIBAVUTIL_VERSION_MAJOR >= 55 | |
-#define FF_CONST_AVUTIL55 const | |
-#else | |
-#define FF_CONST_AVUTIL55 | |
+#ifndef FF_API_FRAME_QP | |
+#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
+#ifndef FF_API_PLUS1_MINUS1 | |
+#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 56) | |
+#endif | |
+#ifndef FF_API_ERROR_FRAME | |
+#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 56) | |
+#endif | |
+#ifndef FF_API_CRC_BIG_TABLE | |
+#define FF_API_CRC_BIG_TABLE (LIBAVUTIL_VERSION_MAJOR < 56) | |
#endif | |
+ | |
/** | |
* @} | |
*/ | |
#endif /* AVUTIL_VERSION_H */ | |
- | |
diff -ur ffmpeg-2.8.3/libavutil/xtea.h ffmpeg-3.0.1/libavutil/xtea.h | |
--- ffmpeg-2.8.3/libavutil/xtea.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libavutil/xtea.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -23,7 +23,6 @@ | |
#define AVUTIL_XTEA_H | |
#include <stdint.h> | |
-#include "version.h" | |
/** | |
* @file | |
@@ -46,12 +45,23 @@ | |
* Initialize an AVXTEA context. | |
* | |
* @param ctx an AVXTEA context | |
- * @param key a key of 16 bytes used for encryption/decryption | |
+ * @param key a key of 16 bytes used for encryption/decryption, | |
+ * interpreted as big endian 32 bit numbers | |
*/ | |
void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); | |
/** | |
- * Encrypt or decrypt a buffer using a previously initialized context. | |
+ * Initialize an AVXTEA context. | |
+ * | |
+ * @param ctx an AVXTEA context | |
+ * @param key a key of 16 bytes used for encryption/decryption, | |
+ * interpreted as little endian 32 bit numbers | |
+ */ | |
+void av_xtea_le_init(struct AVXTEA *ctx, const uint8_t key[16]); | |
+ | |
+/** | |
+ * Encrypt or decrypt a buffer using a previously initialized context, | |
+ * in big endian format. | |
* | |
* @param ctx an AVXTEA context | |
* @param dst destination array, can be equal to src | |
@@ -64,6 +74,20 @@ | |
int count, uint8_t *iv, int decrypt); | |
/** | |
+ * Encrypt or decrypt a buffer using a previously initialized context, | |
+ * in little endian format. | |
+ * | |
+ * @param ctx an AVXTEA context | |
+ * @param dst destination array, can be equal to src | |
+ * @param src source array, can be equal to dst | |
+ * @param count number of 8 byte blocks | |
+ * @param iv initialization vector for CBC mode, if NULL then ECB will be used | |
+ * @param decrypt 0 for encryption, 1 for decryption | |
+ */ | |
+void av_xtea_le_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, | |
+ int count, uint8_t *iv, int decrypt); | |
+ | |
+/** | |
* @} | |
*/ | |
diff -ur ffmpeg-2.8.3/libpostproc/version.h ffmpeg-3.0.1/libpostproc/version.h | |
--- ffmpeg-2.8.3/libpostproc/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libpostproc/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -18,8 +18,8 @@ | |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
-#ifndef POSTPROC_POSTPROCESS_VERSION_H | |
-#define POSTPROC_POSTPROCESS_VERSION_H | |
+#ifndef POSTPROC_VERSION_H | |
+#define POSTPROC_VERSION_H | |
/** | |
* @file | |
@@ -28,8 +28,8 @@ | |
#include "libavutil/avutil.h" | |
-#define LIBPOSTPROC_VERSION_MAJOR 53 | |
-#define LIBPOSTPROC_VERSION_MINOR 3 | |
+#define LIBPOSTPROC_VERSION_MAJOR 54 | |
+#define LIBPOSTPROC_VERSION_MINOR 0 | |
#define LIBPOSTPROC_VERSION_MICRO 100 | |
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ | |
@@ -46,4 +46,4 @@ | |
#define FF_API_QP_TYPE (LIBPOSTPROC_VERSION_MAJOR < 55) | |
#endif | |
-#endif /* POSTPROC_POSTPROCESS_VERSION_H */ | |
+#endif /* POSTPROC_VERSION_H */ | |
diff -ur ffmpeg-2.8.3/libswresample/swresample.h ffmpeg-3.0.1/libswresample/swresample.h | |
--- ffmpeg-2.8.3/libswresample/swresample.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libswresample/swresample.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -169,8 +169,8 @@ | |
/** Resampling Filter Types */ | |
enum SwrFilterType { | |
SWR_FILTER_TYPE_CUBIC, /**< Cubic */ | |
- SWR_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */ | |
- SWR_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */ | |
+ SWR_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall windowed sinc */ | |
+ SWR_FILTER_TYPE_KAISER, /**< Kaiser windowed sinc */ | |
}; | |
/** | |
diff -ur ffmpeg-2.8.3/libswresample/version.h ffmpeg-3.0.1/libswresample/version.h | |
--- ffmpeg-2.8.3/libswresample/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libswresample/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -18,8 +18,8 @@ | |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
-#ifndef SWR_VERSION_H | |
-#define SWR_VERSION_H | |
+#ifndef SWRESAMPLE_VERSION_H | |
+#define SWRESAMPLE_VERSION_H | |
/** | |
* @file | |
@@ -28,8 +28,8 @@ | |
#include "libavutil/avutil.h" | |
-#define LIBSWRESAMPLE_VERSION_MAJOR 1 | |
-#define LIBSWRESAMPLE_VERSION_MINOR 2 | |
+#define LIBSWRESAMPLE_VERSION_MAJOR 2 | |
+#define LIBSWRESAMPLE_VERSION_MINOR 0 | |
#define LIBSWRESAMPLE_VERSION_MICRO 101 | |
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ | |
@@ -42,4 +42,4 @@ | |
#define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) | |
-#endif /* SWR_VERSION_H */ | |
+#endif /* SWRESAMPLE_VERSION_H */ | |
diff -ur ffmpeg-2.8.3/libswscale/swscale.h ffmpeg-3.0.1/libswscale/swscale.h | |
--- ffmpeg-2.8.3/libswscale/swscale.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libswscale/swscale.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -82,22 +82,6 @@ | |
#define SWS_BITEXACT 0x80000 | |
#define SWS_ERROR_DIFFUSION 0x800000 | |
-#if FF_API_SWS_CPU_CAPS | |
-/** | |
- * CPU caps are autodetected now, those flags | |
- * are only provided for API compatibility. | |
- */ | |
-#define SWS_CPU_CAPS_MMX 0x80000000 | |
-#define SWS_CPU_CAPS_MMXEXT 0x20000000 | |
-#define SWS_CPU_CAPS_MMX2 0x20000000 | |
-#define SWS_CPU_CAPS_3DNOW 0x40000000 | |
-#define SWS_CPU_CAPS_ALTIVEC 0x10000000 | |
-#if FF_API_ARCH_BFIN | |
-#define SWS_CPU_CAPS_BFIN 0x01000000 | |
-#endif | |
-#define SWS_CPU_CAPS_SSE2 0x02000000 | |
-#endif | |
- | |
#define SWS_MAX_REDUCE_CUTOFF 0.002 | |
#define SWS_CS_ITU709 1 | |
@@ -166,6 +150,7 @@ | |
* @return zero or positive value on success, a negative value on | |
* error | |
*/ | |
+av_warn_unused_result | |
int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter); | |
/** | |
diff -ur ffmpeg-2.8.3/libswscale/version.h ffmpeg-3.0.1/libswscale/version.h | |
--- ffmpeg-2.8.3/libswscale/version.h 2015-11-27 19:13:21.000000000 +0100 | |
+++ ffmpeg-3.0.1/libswscale/version.h 2016-04-03 16:17:35.000000000 +0200 | |
@@ -26,9 +26,9 @@ | |
#include "libavutil/version.h" | |
-#define LIBSWSCALE_VERSION_MAJOR 3 | |
-#define LIBSWSCALE_VERSION_MINOR 1 | |
-#define LIBSWSCALE_VERSION_MICRO 101 | |
+#define LIBSWSCALE_VERSION_MAJOR 4 | |
+#define LIBSWSCALE_VERSION_MINOR 0 | |
+#define LIBSWSCALE_VERSION_MICRO 100 | |
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ | |
LIBSWSCALE_VERSION_MINOR, \ | |
@@ -46,11 +46,4 @@ | |
* the public API and may change, break or disappear at any time. | |
*/ | |
-#ifndef FF_API_SWS_CPU_CAPS | |
-#define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4) | |
-#endif | |
-#ifndef FF_API_ARCH_BFIN | |
-#define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4) | |
-#endif | |
- | |
#endif /* SWSCALE_VERSION_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment