[FFmpeg-cvslog] r23379 - in branches/0.6: . Changelog doc/APIchanges libavcodec/avcodec.h libavcodec/utils.c

siretart subversion
Sat May 29 16:33:02 CEST 2010


Author: siretart
Date: Sat May 29 16:33:02 2010
New Revision: 23379

Log:
Add CODEC_CAP_EXPERIMENTAL and prefer encoders without it.

Patch by Janne Grunau, janne-ffmpeg jannau net 


backport r23334,23337-23338 by cehoyos and stefano

Modified:
   branches/0.6/   (props changed)
   branches/0.6/Changelog
   branches/0.6/doc/APIchanges
   branches/0.6/libavcodec/avcodec.h
   branches/0.6/libavcodec/utils.c

Modified: branches/0.6/Changelog
==============================================================================
--- branches/0.6/Changelog	Sat May 29 16:25:18 2010	(r23378)
+++ branches/0.6/Changelog	Sat May 29 16:33:02 2010	(r23379)
@@ -79,6 +79,7 @@ version 0.6:
 - low overhead Ogg muxing
 - WebM support in Matroska demuxer
 - VP8 decoding via libvpx
+- CODEC_CAP_EXPERIMENTAL added
 
 
 

Modified: branches/0.6/doc/APIchanges
==============================================================================
--- branches/0.6/doc/APIchanges	Sat May 29 16:25:18 2010	(r23378)
+++ branches/0.6/doc/APIchanges	Sat May 29 16:33:02 2010	(r23379)
@@ -12,6 +12,9 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2010-05-26 - r23334 - lavc 52.72.0 - CODEC_CAP_EXPERIMENTAL
+  Add CODEC_CAP_EXPERIMENTAL flag.
+
 2010-05-18 - r23161 - lavf 52.63.0 - AVFMT_FLAG_RTP_HINT
   Add AVFMT_FLAG_RTP_HINT as possible value for AVFormatContext.flags
 

Modified: branches/0.6/libavcodec/avcodec.h
==============================================================================
--- branches/0.6/libavcodec/avcodec.h	Sat May 29 16:25:18 2010	(r23378)
+++ branches/0.6/libavcodec/avcodec.h	Sat May 29 16:33:02 2010	(r23379)
@@ -30,7 +30,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 69
+#define LIBAVCODEC_VERSION_MINOR 72
 #define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -644,6 +644,11 @@ typedef struct RcOverride{
  * as a last resort.
  */
 #define CODEC_CAP_SUBFRAMES        0x0100
+/**
+ * Codec is experimental and is thus avoided in favor of non experimental
+ * encoders
+ */
+#define CODEC_CAP_EXPERIMENTAL     0x0200
 
 //The following defines may change, don't expect compatibility if you use them.
 #define MB_TYPE_INTRA4x4   0x0001

Modified: branches/0.6/libavcodec/utils.c
==============================================================================
--- branches/0.6/libavcodec/utils.c	Sat May 29 16:25:18 2010	(r23378)
+++ branches/0.6/libavcodec/utils.c	Sat May 29 16:33:02 2010	(r23379)
@@ -724,14 +724,18 @@ av_cold int avcodec_close(AVCodecContext
 
 AVCodec *avcodec_find_encoder(enum CodecID id)
 {
-    AVCodec *p;
+    AVCodec *p, *experimental=NULL;
     p = first_avcodec;
     while (p) {
-        if (p->encode != NULL && p->id == id)
-            return p;
+        if (p->encode != NULL && p->id == id) {
+            if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
+                experimental = p;
+            } else
+                return p;
+        }
         p = p->next;
     }
-    return NULL;
+    return experimental;
 }
 
 AVCodec *avcodec_find_encoder_by_name(const char *name)



More information about the ffmpeg-cvslog mailing list