Adds a check to see if the hardware supports temporal aq.


>From a68d7b359d53a4d858a25a146489f24a39f4dad0 Mon Sep 17 00:00:00 2001
From: "Sven C. Dack" <sven.c.d...@sky.com>
Date: Fri, 14 Oct 2016 15:12:27 +0100
Subject: [PATCH] libavcodec/nvenc.c: add test for Temporal AQ support

---
 libavcodec/nvenc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index e6c1c94..2505c3d 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -356,6 +356,12 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
         return AVERROR(ENOSYS);
     }
 
+    ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_TEMPORAL_AQ);
+    if (ctx->temporal_aq > 0 && ret <= 0) {
+        av_log(avctx, AV_LOG_VERBOSE, "Temporal AQ not supported\n");
+        return AVERROR(ENOSYS);
+    }
+
     return 0;
 }
 
-- 
2.9.3

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

Reply via email to