1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-01 00:54:33 +02:00

Merge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'

* commit '136e7cf64ce9e78de7158d6720539d51cb96b743':
  qsv/hevcdec: Load hw plugin by default on non-windows os

Merged-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
Mark Thompson 2017-11-25 14:38:03 +00:00
commit b26dd5ae2f

View File

@ -171,6 +171,12 @@ static void qsv_decode_flush(AVCodecContext *avctx)
ff_qsv_decode_flush(avctx, &s->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(QSVH2645Context, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
@ -187,7 +193,7 @@ AVHWAccel ff_hevc_qsv_hwaccel = {
static const AVOption hevc_options[] = {
{ "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
{ "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, VD, "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, VD, "load_plugin" },
{ "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE }, 0, 0, VD, "load_plugin" },
{ "hevc_sw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_SW }, 0, 0, VD, "load_plugin" },
{ "hevc_hw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_HW }, 0, 0, VD, "load_plugin" },