ffmpeg | branch: master | Philip Langdale <phil...@overt.org> | Tue Jun 23 
20:37:08 2015 -0700| [d3eb317b862c3f5653f0ae8dfcb22edf1713ab5b] | committer: 
Philip Langdale

ffmpeg_vdpau: Ignore decoder's max supported level

The h264 decoder reports 4.1 as its maximum level, but it will decode
5.1 4K video just fine. In practice, the published level limits in
vdpau do not communicate anything that's actually useful.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3eb317b862c3f5653f0ae8dfcb22edf1713ab5b
---

 ffmpeg_vdpau.c       |    3 ++-
 libavcodec/avcodec.h |    3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ffmpeg_vdpau.c b/ffmpeg_vdpau.c
index b05e557..92a98ea 100644
--- a/ffmpeg_vdpau.c
+++ b/ffmpeg_vdpau.c
@@ -289,7 +289,8 @@ do {
 
         s->hwaccel_context = vdpau_ctx;
     } else
-    if (av_vdpau_bind_context(s, ctx->device, ctx->get_proc_address, 0))
+    if (av_vdpau_bind_context(s, ctx->device, ctx->get_proc_address,
+                              AV_HWACCEL_FLAG_IGNORE_LEVEL))
         goto fail;
 
     ctx->get_information_string(&vendor);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4222db6..f09d8f4 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3715,6 +3715,9 @@ typedef struct AVHWAccel {
  * Hardware acceleration should be used for decoding even if the codec level
  * used is unknown or higher than the maximum supported level reported by the
  * hardware driver.
+ *
+ * It's generally a good idea to pass this flag unless you have a specific
+ * reason not to, as hardware tends to under-report supported levels.
  */
 #define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to