diff options
author | James Almer <jamrial@gmail.com> | 2018-04-13 20:34:23 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-04-13 20:34:23 -0300 |
commit | f790410b6baa4ee53e8a5796e986de0cae78b073 (patch) | |
tree | dc092d2c1bf35c8eb9888f7b3f77c4720bacf423 /libavcodec/qsvenc.c | |
parent | ae7e66fb4b1a256fb79a016b9c585de84ac77339 (diff) | |
parent | cca5e4f040971db6de0bfe6968f00c021d8a9c42 (diff) | |
download | ffmpeg-f790410b6baa4ee53e8a5796e986de0cae78b073.tar.gz |
Merge commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'
* commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42':
qsv: adding Multi Frame Encode support
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r-- | libavcodec/qsvenc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index afb953eb11..3ce5ffecd5 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -652,6 +652,20 @@ FF_ENABLE_DEPRECATION_WARNINGS q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco2; } #endif +#if QSV_HAVE_MF + if (avctx->codec_id == AV_CODEC_ID_H264) { + mfxVersion ver; + ret = MFXQueryVersion(q->session,&ver); + if (ret >= MFX_ERR_NONE && QSV_RUNTIME_VERSION_ATLEAST(ver, 1, 25)) { + q->extmfp.Header.BufferId = MFX_EXTBUFF_MULTI_FRAME_PARAM; + q->extmfp.Header.BufferSz = sizeof(q->extmfp); + + q->extmfp.MFMode = q->mfmode; + av_log(avctx,AV_LOG_VERBOSE,"MFMode:%d\n", q->extmfp.MFMode); + q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extmfp; + } + } +#endif } if (!check_enc_param(avctx,q)) { |