diff options
author | Maxym Dmytrychenko <maxim.d33@gmail.com> | 2018-04-02 16:17:23 +0300 |
---|---|---|
committer | Maxym Dmytrychenko <maxim.d33@gmail.com> | 2018-04-08 21:47:59 +0300 |
commit | cca5e4f040971db6de0bfe6968f00c021d8a9c42 (patch) | |
tree | 8d9dc68ef641717b1d91283f712da6dcb5947a7f /libavcodec/qsv.c | |
parent | 29a8ed766354c45c9be4b8512c5b2eb25a450cdc (diff) |
qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:
./avconv -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4 -vframes 600 -an \
-filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
-map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
-map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r-- | libavcodec/qsv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index e578ab15f5..a9b3c59f3a 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -617,10 +617,12 @@ int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, "Error setting a HW handle"); } - err = MFXJoinSession(parent_session, session); - if (err != MFX_ERR_NONE) - return ff_qsv_print_error(avctx, err, - "Error joining session"); + if (QSV_RUNTIME_VERSION_ATLEAST(ver, 1, 25)) { + err = MFXJoinSession(parent_session, session); + if (err != MFX_ERR_NONE) + return ff_qsv_print_error(avctx, err, + "Error joining session"); + } ret = qsv_load_plugins(session, load_plugins, avctx); if (ret < 0) { |