From da4d0fa86b48d79398b0ccf7ecadc6ff69e3c947 Mon Sep 17 00:00:00 2001 From: "Sven C. Dack" Date: Fri, 14 Oct 2016 16:02:54 +0100 Subject: [PATCH] avcodec/nvenc: add test for Temporal AQ support Adds a check to see if the hardware supports temporal aq. Signed-off-by: Timo Rothenpieler --- libavcodec/nvenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index e6c1c94144..2505c3d1e3 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; }