[FFmpeg-devel] [PATCH 14/24] lavc: Add flag to allow profile mismatch with hardware decoding

Mark Thompson sw at jkqxz.net
Tue Jun 13 01:40:31 EEST 2017


(cherry picked from commit 64a5260c695dd8051509d3270295fd64eac56587)
---
 doc/APIchanges       |  3 +++
 libavcodec/avcodec.h | 14 ++++++++++++++
 libavcodec/version.h |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 5b2203f2b4..12c4877b9b 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil:     2015-08-28
 
 API changes, most recent first:
 
+2017-06-xx - xxxxxxx - lavc 57.99.100 - avcodec.h
+  Add AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH.
+
 2017-06-xx - xxxxxxx - lavu 55.65.100 - hwcontext.h
   Add AV_HWDEVICE_TYPE_NONE, av_hwdevice_find_type_by_name(),
   av_hwdevice_get_type_name() and av_hwdevice_iterate_types().
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index dcdcfe00ae..39be8cf717 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4002,6 +4002,20 @@ typedef struct AVHWAccel {
 #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
 
 /**
+ * Hardware acceleration should still be attempted for decoding when the
+ * codec profile does not match the reported capabilities of the hardware.
+ *
+ * For example, this can be used to try to decode baseline profile H.264
+ * streams in hardware - it will often succeed, because many streams marked
+ * as baseline profile actually conform to constrained baseline profile.
+ *
+ * @warning If the stream is actually not supported then the behaviour is
+ *          undefined, and may include returning entirely incorrect output
+ *          while indicating success.
+ */
+#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
+
+/**
  * @}
  */
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index c93487273a..a44a88832d 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  57
-#define LIBAVCODEC_VERSION_MINOR  98
+#define LIBAVCODEC_VERSION_MINOR  99
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-- 
2.11.0



More information about the ffmpeg-devel mailing list