[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42134] trunk/lib/darwin-9.x.universal/ ffmpeg: OSX: update ffmpeg to 0.8.7

jens verwiebe info at jensverwiebe.de
Thu Nov 24 19:03:25 CET 2011


Revision: 42134
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42134
Author:   jensverwiebe
Date:     2011-11-24 18:03:25 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
OSX: update ffmpeg to 0.8.7

Modified Paths:
--------------
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avcodec.h
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/version.h
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/avformat.h
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/version.h
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/mem.h
    trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/opt.h
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavcodec.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavdevice.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavfilter.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavformat.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavutil.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libpostproc.a
    trunk/lib/darwin-9.x.universal/ffmpeg/lib/libswscale.a

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avcodec.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avcodec.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avcodec.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -30,6 +30,7 @@
 #include "libavutil/samplefmt.h"
 #include "libavutil/avutil.h"
 #include "libavutil/cpu.h"
+#include "libavutil/dict.h"
 
 #include "libavcodec/version.h"
 
@@ -2606,7 +2607,6 @@
 
     /**
      * Bits per sample/pixel of internal libavcodec pixel/sample format.
-     * This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32.
      * - encoding: set by user.
      * - decoding: set by libavcodec.
      */
@@ -3684,6 +3684,7 @@
 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
 //FIXME func typedef
 
+#if FF_API_AVCODEC_OPEN
 /**
  * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
  * function the context has to be allocated.
@@ -3710,10 +3711,46 @@
  * @param codec The codec to use within the context.
  * @return zero on success, a negative value on error
  * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder, avcodec_close
+ *
+ * @deprecated use avcodec_open2
  */
 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
+#endif
 
 /**
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
+ * function the context has to be allocated with avcodec_alloc_context().
+ *
+ * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
+ * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
+ * retrieving a codec.
+ *
+ * @warning This function is not thread safe!
+ *
+ * @code
+ * avcodec_register_all();
+ * av_dict_set(&opts, "b", "2.5M", 0);
+ * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * if (!codec)
+ *     exit(1);
+ *
+ * context = avcodec_alloc_context();
+ *
+ * if (avcodec_open(context, codec, opts) < 0)
+ *     exit(1);
+ * @endcode
+ *
+ * @param avctx The context to initialize.
+ * @param options A dictionary filled with AVCodecContext and codec-private options.
+ *                On return this object will be filled with options that were not found.
+ *
+ * @return zero on success, a negative value on error
+ * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),
+ *      av_dict_set(), av_opt_find().
+ */
+int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options);
+
+/**
  * 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,

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/version.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/version.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/version.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -21,7 +21,7 @@
 #define AVCODEC_VERSION_H
 
 #define LIBAVCODEC_VERSION_MAJOR 53
-#define LIBAVCODEC_VERSION_MINOR  7
+#define LIBAVCODEC_VERSION_MINOR  8
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -68,5 +68,8 @@
 #ifndef FF_API_GET_PIX_FMT_NAME
 #define FF_API_GET_PIX_FMT_NAME (LIBAVCODEC_VERSION_MAJOR < 54)
 #endif
+#ifndef FF_API_AVCODEC_OPEN
+#define FF_API_AVCODEC_OPEN     (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
 
 #endif /* AVCODEC_VERSION_H */

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/avformat.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/avformat.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/avformat.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -1152,6 +1152,7 @@
 int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat,
                                    const char *format_name, const char *filename);
 
+#if FF_API_FORMAT_PARAMETERS
 /**
  * Read packets of a media file to get stream information. This
  * is useful for file formats with no headers such as MPEG. This
@@ -1164,10 +1165,36 @@
  * @return >=0 if OK, AVERROR_xxx on error
  * @todo Let the user decide somehow what information is needed so that
  *       we do not waste time getting stuff the user does not need.
+ *
+ * @deprecated use avformat_find_stream_info.
  */
 int av_find_stream_info(AVFormatContext *ic);
+#endif
 
 /**
+ * Read packets of a media file to get stream information. This
+ * is useful for file formats with no headers such as MPEG. This
+ * function also computes the real framerate in case of MPEG-2 repeat
+ * frame mode.
+ * The logical file position is not changed by this function;
+ * examined packets may be buffered for later processing.
+ *
+ * @param ic media file handle
+ * @param options  If non-NULL, an ic.nb_streams long array of pointers to
+ *                 dictionaries, where i-th member contains options for
+ *                 codec corresponding to i-th stream.
+ *                 On return each dictionary will be filled with options that were not found.
+ * @return >=0 if OK, AVERROR_xxx on error
+ *
+ * @note this function isn't guaranteed to open all the codecs, so
+ *       options being non-empty at return is a perfectly normal behavior.
+ *
+ * @todo Let the user decide somehow what information is needed so that
+ *       we do not waste time getting stuff the user does not need.
+ */
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+
+/**
  * Find the "best" stream in the file.
  * The best stream is determined according to various heuristics as the most
  * likely to be what the user expects.

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/version.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/version.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavformat/version.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -24,7 +24,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVFORMAT_VERSION_MAJOR 53
-#define LIBAVFORMAT_VERSION_MINOR  4
+#define LIBAVFORMAT_VERSION_MINOR  5
 #define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/mem.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/mem.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/mem.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -27,6 +27,7 @@
 #define AVUTIL_MEM_H
 
 #include "attributes.h"
+#include "error.h"
 #include "avutil.h"
 
 #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
@@ -87,6 +88,16 @@
 void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
 
 /**
+ * Allocate or reallocate a block of memory.
+ * This function does the same thing as av_realloc, except:
+ * - It takes two arguments and checks the result of the multiplication for
+ *   integer overflow.
+ * - It frees the input block in case of failure, thus avoiding the memory
+ *   leak with the classic "buf = realloc(buf); if (!buf) return -1;".
+ */
+void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
+
+/**
  * Free a memory block which has been allocated with av_malloc(z)() or
  * av_realloc().
  * @param ptr Pointer to the memory block which should be freed.
@@ -107,6 +118,18 @@
 void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
 
 /**
+ * Allocate a block of nmemb * size bytes with alignment suitable for all
+ * memory accesses (including vectors if available on the CPU) and
+ * zero all the bytes of the block.
+ * The allocation will fail if nmemb * size is greater than or equal
+ * to INT_MAX.
+ * @param nmemb
+ * @param size
+ * @return Pointer to the allocated block, NULL if it cannot be allocated.
+ */
+void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib;
+
+/**
  * Duplicate the string s.
  * @param s string to be duplicated
  * @return Pointer to a newly allocated string containing a
@@ -132,4 +155,19 @@
  */
 void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
 
+/**
+ * Multiply two size_t values checking for overflow.
+ * @return  0 if success, AVERROR(EINVAL) if overflow.
+ */
+static inline int av_size_mult(size_t a, size_t b, size_t *r)
+{
+    size_t t = a * b;
+    /* Hack inspired from glibc: only try the division if nelem and elsize
+     * are both greater than sqrt(SIZE_MAX). */
+    if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
+        return AVERROR(EINVAL);
+    *r = t;
+    return 0;
+}
+
 #endif /* AVUTIL_MEM_H */

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/opt.h
===================================================================
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/opt.h	2011-11-24 17:19:38 UTC (rev 42133)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/opt.h	2011-11-24 18:03:25 UTC (rev 42134)
@@ -134,7 +134,7 @@
  *              when 0 then no av_free() nor av_strdup() will be used
  * @return 0 if the value has been set, or an AVERROR code in case of
  * error:
- * AVERROR(ENOENT) if no matching option exists
+ * 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
  */

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavcodec.a
===================================================================
(Binary files differ)

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavdevice.a
===================================================================
(Binary files differ)

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavfilter.a
===================================================================
(Binary files differ)

Modified: trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavformat.a

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list