[FFmpeg-cvslog] avcodec/nvenc: Check capabilities for interlaced encoding

Timo Rothenpieler git at videolan.org
Mon Jun 6 23:53:21 CEST 2016


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Mon Jun  6 21:19:29 2016 +0200| [808356c61c6ed05467d4351b12dd34938705cd65] | committer: Timo Rothenpieler

avcodec/nvenc: Check capabilities for interlaced encoding

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

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

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d3115f4..ae1612f 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -306,6 +306,14 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
         return AVERROR(ENOSYS);
     }
 
+    ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_FIELD_ENCODING);
+    if (ret < 1 && avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
+        av_log(avctx, AV_LOG_VERBOSE,
+               "Interlaced encoding is not supported. Supported level: %d\n",
+               ret);
+        return AVERROR(ENOSYS);
+    }
+
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list