diff options
author | Sven Dueking <sven@nablet.com> | 2015-10-01 09:07:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-01 16:12:33 +0200 |
commit | 5d4a3563f23d39338bf6807caaec0e90cce90f3c (patch) | |
tree | 9c2a6fd3914b7b497576918c06f940cc94b57a8f | |
parent | 7218352e0228028dfa009a3799ec93fd041065f1 (diff) | |
download | ffmpeg-5d4a3563f23d39338bf6807caaec0e90cce90f3c.tar.gz |
qsvenc.c: use query to catch all kind of setting issues
Reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/qsvenc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 1013fe15a8..55140e1135 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -264,6 +264,14 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q) if (ret < 0) return ret; + ret = MFXVideoENCODE_Query(q->session, &q->param,&q->param); + if (MFX_WRN_PARTIAL_ACCELERATION==ret) { + av_log(avctx, AV_LOG_WARNING, "Encoder will work with partial HW acceleration\n"); + } else if (ret < 0) { + av_log(avctx, AV_LOG_ERROR, "Error %d querying encoder params\n", ret); + return ff_qsv_error(ret); + } + ret = MFXVideoENCODE_QueryIOSurf(q->session, &q->param, &q->req); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Error querying the encoding parameters\n"); |