aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLi, Zhong <zhong.li@intel.com>2017-11-10 03:03:42 -0500
committerMaxym Dmytrychenko <maxim.d33@gmail.com>2017-11-23 12:59:02 +0100
commit136e7cf64ce9e78de7158d6720539d51cb96b743 (patch)
tree036f193c67f3d12ec7415a46403d9ec0c34b93d9 /libavcodec
parent3152058bf1dca318898550efacf0286f4836cae6 (diff)
downloadffmpeg-136e7cf64ce9e78de7158d6720539d51cb96b743.tar.gz
qsv/hevcdec: Load hw plugin by default on non-windows os
Software plugin is not available on Linux, Only works on Windows. Similar changes have been applied to qsv hevc encoder by b05128f3c953bd66483e697d60a2e7e45ee9cfa0. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvdec_h2645.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index a2a6cc3c47..e3184d8749 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -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" },