diff options
author | Lukas Rusak <lorusak@gmail.com> | 2018-05-05 13:58:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 13:58:47 -0700 |
commit | 249cea99b38da168a4e6d951271fcf3d428964a1 (patch) | |
tree | 6e2bdf886da16606bd160bdbadc908d793b79766 | |
parent | 78af1d6a4576008c7544e56e14aa1bb533017a90 (diff) | |
parent | 309fce5ab5747e7831bcf67ea60e6e805a5c764a (diff) |
Merge pull request #13843 from lrusak/vp8-vaapi
VAAPI: add vp8 support
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 22 | ||||
-rw-r--r-- | system/settings/linux.xml | 24 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 11 | ||||
-rw-r--r-- | xbmc/settings/Settings.cpp | 2 | ||||
-rw-r--r-- | xbmc/settings/Settings.h | 2 |
5 files changed, 60 insertions, 1 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 00c38a659d..d505d3a365 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -7121,7 +7121,27 @@ msgctxt "#13452" msgid "Enable this option to use hardware acceleration for VC-1 based codecs. If disabled the CPU will be used instead. Especially VC-1 interlaced fails hard on Intel hardware." msgstr "" -#empty strings from id 13453 to 13456 +#: system/settings/settings.xml +msgctxt "#13453" +msgid "Use VP8 VAAPI" +msgstr "" + +#. Description of setting with label #13453 "Use VP8 VAAPI" +#: system/settings/settings.xml +msgctxt "#13454" +msgid "Enable this option to use hardware acceleration for the VP8 codec. If disabled the CPU will be used instead." +msgstr "" + +#: 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 4e3702d16c..82b2f6e534 100644 --- a/system/settings/linux.xml +++ b/system/settings/linux.xml @@ -100,6 +100,30 @@ <default>true</default> <control type="toggle" /> </setting> + <setting id="videoplayer.usevaapivp8" type="boolean" parent="videoplayer.usevaapi" label="13453" help="13454"> + <requirement>HAVE_LIBVA</requirement> + <visible>false</visible> + <dependencies> + <dependency type="enable"> + <condition setting="videoplayer.usevaapi" operator="is">true</condition> + </dependency> + </dependencies> + <level>3</level> + <default>true</default> + <control type="toggle" /> + </setting> + <setting id="videoplayer.usevaapivp9" type="boolean" parent="videoplayer.usevaapi" label="13455" help="13456"> + <requirement>HAVE_LIBVA</requirement> + <visible>false</visible> + <dependencies> + <dependency type="enable"> + <condition setting="videoplayer.usevaapi" operator="is">true</condition> + </dependency> + </dependencies> + <level>3</level> + <default>true</default> + <control type="toggle" /> + </setting> <setting id="videoplayer.prefervaapirender" type="boolean" parent="videoplayer.usevaapi" label="13457" help="36433"> <requirement>HAVE_LIBVA</requirement> <visible>false</visible> diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp index 3420ed13ce..75cf67cf08 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp @@ -505,6 +505,8 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A { AV_CODEC_ID_WMV3, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 }, { 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); @@ -595,6 +597,13 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A return false; break; } + case AV_CODEC_ID_VP8: + { + profile = VAProfileVP8Version0_3; + if (!m_vaapiConfig.context->SupportsProfile(profile)) + return false; + break; + } case AV_CODEC_ID_VP9: { if (avctx->profile == FF_PROFILE_VP9_0) @@ -1197,6 +1206,8 @@ void CDecoder::Register(IVaapiWinSystem *winSystem, bool deepColor) CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4)->SetVisible(true); 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 c746bf0fa8..71fcef3493 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -167,6 +167,8 @@ const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPI = "videoplayer.usevaap const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 = "videoplayer.usevaapimpeg2"; 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 9825e9aca8..bdb32fc4f7 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -121,6 +121,8 @@ public: static const std::string SETTING_VIDEOPLAYER_USEVAAPIMPEG2; 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; |