OSDN Git Service

avcodec/nvenc: add test for Temporal AQ support
authorSven C. Dack <sven.c.dack@sky.com>
Fri, 14 Oct 2016 15:02:54 +0000 (16:02 +0100)
committerTimo Rothenpieler <timo@rothenpieler.org>
Wed, 19 Oct 2016 10:41:41 +0000 (12:41 +0200)
Adds a check to see if the hardware supports temporal aq.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
libavcodec/nvenc.c

index e6c1c94..2505c3d 100644 (file)
@@ -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;
 }