diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2017-09-06 13:07:40 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-09-11 17:17:56 +0200 |
commit | b05128f3c953bd66483e697d60a2e7e45ee9cfa0 (patch) | |
tree | c657d39afe410b59280f4d7be19dd555118aaae5 /libavcodec/qsvenc_hevc.c | |
parent | f19fbfbdc637e08ad5c980807ede2d023f20c049 (diff) | |
download | ffmpeg-streaming-b05128f3c953bd66483e697d60a2e7e45ee9cfa0.zip ffmpeg-streaming-b05128f3c953bd66483e697d60a2e7e45ee9cfa0.tar.gz |
qsv: Load the hw hevc plugin by default on Linux
Only on Windows the software plugin is available.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/qsvenc_hevc.c')
-rw-r--r-- | libavcodec/qsvenc_hevc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index 27ff0c6..efed4d9 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -209,12 +209,18 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) return ff_qsv_enc_close(avctx, &q->qsv); } +#if defined(_WIN32) +#define LOAD_PLUGIN_DEFAULT LOAD_PLUGIN_HEVC_SW +#else +#define LOAD_PLUGIN_DEFAULT LOAD_PLUGIN_HEVC_HW +#endif + #define OFFSET(x) offsetof(QSVHEVCEncContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { QSV_COMMON_OPTS - { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_HEVC_SW }, LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VE, "load_plugin" }, + { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_DEFAULT }, LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VE, "load_plugin" }, { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE }, 0, 0, VE, "load_plugin" }, { "hevc_sw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_SW }, 0, 0, VE, "load_plugin" }, { "hevc_hw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_HW }, 0, 0, VE, "load_plugin" }, |