summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAaron Levinson <alevinsn@aracnet.com>2017-04-16 18:07:42 -0700
committerLuca Barbato <lu_zero@gentoo.org>2017-04-23 16:15:05 +0200
commitb22094d74901fb3ac203c8322f8d84aded470bfb (patch)
treed6e7b76358efa87b9016d950b0f1a014953acce4 /libavcodec
parente00db9f78bb475ed5103364f61892f4e75ef89ba (diff)
downloadffmpeg-streaming-b22094d74901fb3ac203c8322f8d84aded470bfb.zip
ffmpeg-streaming-b22094d74901fb3ac203c8322f8d84aded470bfb.tar.gz
qsvenc: Use MFXVideoENCODE_Query() to update the parameters
Fill out the default/unset parameters with ones actually in use. Matches the current MediaSDK example code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index bd8c243..6ac5ca1 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -757,10 +757,18 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
if (ret < 0)
return ret;
+ ret = MFXVideoENCODE_Query(q->session, &q->param, &q->param);
+ if (ret == MFX_WRN_PARTIAL_ACCELERATION) {
+ av_log(avctx, AV_LOG_WARNING, "Encoder will work with partial HW acceleration\n");
+ } else if (ret < 0) {
+ return ff_qsv_print_error(avctx, ret,
+ "Error querying encoder params");
+ }
+
ret = MFXVideoENCODE_QueryIOSurf(q->session, &q->param, &q->req);
if (ret < 0)
return ff_qsv_print_error(avctx, ret,
- "Error querying the encoding parameters");
+ "Error querying (IOSurf) the encoding parameters");
if (opaque_alloc) {
ret = qsv_init_opaque_alloc(avctx, q);
OpenPOWER on IntegriCloud