From 309fce5ab5747e7831bcf67ea60e6e805a5c764a Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Fri, 4 May 2018 14:03:08 -0700 Subject: VideoPlayer: add setting for using VAAPI VP9 --- addons/resource.language.en_gb/resources/strings.po | 11 ++++++++++- system/settings/linux.xml | 12 ++++++++++++ xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 2 ++ xbmc/settings/Settings.cpp | 1 + xbmc/settings/Settings.h | 1 + 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 5367b6b3e5..d505d3a365 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -7132,7 +7132,16 @@ msgctxt "#13454" msgid "Enable this option to use hardware acceleration for the VP8 codec. If disabled the CPU will be used instead." msgstr "" -#empty strings from id 13455 to 13456 +#: system/settings/settings.xml +msgctxt "#13455" +msgid "Use VP9 VAAPI" +msgstr "" + +#. Description of setting with label #13453 "Use VP9 VAAPI" +#: system/settings/settings.xml +msgctxt "#13456" +msgid "Enable this option to use hardware acceleration for the VP9 codec. If disabled the CPU will be used instead." +msgstr "" #. Option for video related setting #13454: sw filter #: system/settings/settings.xml diff --git a/system/settings/linux.xml b/system/settings/linux.xml index 1a017272d1..82b2f6e534 100644 --- a/system/settings/linux.xml +++ b/system/settings/linux.xml @@ -112,6 +112,18 @@ true + + HAVE_LIBVA + false + + + true + + + 3 + true + + HAVE_LIBVA false diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp index 9b960e6e1c..75cf67cf08 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp @@ -506,6 +506,7 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A { AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 }, { AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 }, { AV_CODEC_ID_VP8, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8 }, + { AV_CODEC_ID_VP9, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9 }, }; auto entry = settings_map.find(avctx->codec_id); @@ -1206,6 +1207,7 @@ void CDecoder::Register(IVaapiWinSystem *winSystem, bool deepColor) CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1)->SetVisible(true); CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2)->SetVisible(true); CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8)->SetVisible(true); + CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9)->SetVisible(true); } //----------------------------------------------------------------------------- diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 1fa1b3daf8..71fcef3493 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -168,6 +168,7 @@ const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 = "videoplayer.us const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4 = "videoplayer.usevaapimpeg4"; const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 = "videoplayer.usevaapivc1"; const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8 = "videoplayer.usevaapivp8"; +const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9 = "videoplayer.usevaapivp9"; const std::string CSettings::SETTING_VIDEOPLAYER_PREFERVAAPIRENDER = "videoplayer.prefervaapirender"; const std::string CSettings::SETTING_VIDEOPLAYER_USEDXVA2 = "videoplayer.usedxva2"; const std::string CSettings::SETTING_VIDEOPLAYER_USEOMXPLAYER = "videoplayer.useomxplayer"; diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index 6d4f20a3f2..bdb32fc4f7 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -122,6 +122,7 @@ public: static const std::string SETTING_VIDEOPLAYER_USEVAAPIMPEG4; static const std::string SETTING_VIDEOPLAYER_USEVAAPIVC1; static const std::string SETTING_VIDEOPLAYER_USEVAAPIVP8; + static const std::string SETTING_VIDEOPLAYER_USEVAAPIVP9; static const std::string SETTING_VIDEOPLAYER_PREFERVAAPIRENDER; static const std::string SETTING_VIDEOPLAYER_USEDXVA2; static const std::string SETTING_VIDEOPLAYER_USEOMXPLAYER; -- cgit v1.2.3