Commit b05128f3 authored by Luca Barbato's avatar Luca Barbato

qsv: Load the hw hevc plugin by default on Linux

Only on Windows the software plugin is available.
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent f19fbfbd
...@@ -209,12 +209,18 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) ...@@ -209,12 +209,18 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx)
return ff_qsv_enc_close(avctx, &q->qsv); 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 OFFSET(x) offsetof(QSVHEVCEncContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = { static const AVOption options[] = {
QSV_COMMON_OPTS 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" }, { "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_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" }, { "hevc_hw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_HW }, 0, 0, VE, "load_plugin" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment