diff options
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 11 | ||||
-rw-r--r-- | system/settings/linux.xml | 12 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 6 |
3 files changed, 27 insertions, 2 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 95cc956764..caa4bc433c 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -7536,6 +7536,17 @@ msgctxt "#13469" msgid "Enable this option to use hardware acceleration for the AV1 codec. If disabled the CPU will be used instead." msgstr "" +#: system/settings/settings.xml +msgctxt "#13470" +msgid "Use AVC VAAPI" +msgstr "" + +#. Description of setting with label #13470 "Use AVC VAAPI" +#: system/settings/settings.xml +msgctxt "#13471" +msgid "Enable this option to use hardware acceleration for the AVC codec. If disabled the CPU will be used instead." +msgstr "" + #empty strings from id 13468 to 13504 #: system/settings/settings.xml diff --git a/system/settings/linux.xml b/system/settings/linux.xml index 531974f3f4..c99bd89527 100644 --- a/system/settings/linux.xml +++ b/system/settings/linux.xml @@ -149,6 +149,18 @@ <default>true</default> <control type="toggle" /> </setting> + <setting id="videoplayer.usevaapiavc" type="boolean" parent="videoplayer.usevaapi" label="13470" help="13471"> + <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 fb7606e0d0..6ace85dc92 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp @@ -57,6 +57,7 @@ using namespace std::chrono_literals; constexpr auto SETTING_VIDEOPLAYER_USEVAAPI = "videoplayer.usevaapi"; constexpr auto SETTING_VIDEOPLAYER_USEVAAPIAV1 = "videoplayer.usevaapiav1"; +constexpr auto SETTING_VIDEOPLAYER_USEVAAPIAVC = "videoplayer.usevaapiavc"; constexpr auto SETTING_VIDEOPLAYER_USEVAAPIHEVC = "videoplayer.usevaapihevc"; constexpr auto SETTING_VIDEOPLAYER_USEVAAPIMPEG2 = "videoplayer.usevaapimpeg2"; constexpr auto SETTING_VIDEOPLAYER_USEVAAPIMPEG4 = "videoplayer.usevaapimpeg4"; @@ -542,6 +543,7 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A {AV_CODEC_ID_VP9, SETTING_VIDEOPLAYER_USEVAAPIVP9}, {AV_CODEC_ID_HEVC, SETTING_VIDEOPLAYER_USEVAAPIHEVC}, {AV_CODEC_ID_AV1, SETTING_VIDEOPLAYER_USEVAAPIAV1}, + {AV_CODEC_ID_H264, SETTING_VIDEOPLAYER_USEVAAPIAVC}, }; auto entry = settings_map.find(avctx->codec_id); @@ -1277,12 +1279,12 @@ void CDecoder::Register(IVaapiWinSystem *winSystem, bool deepColor) if (!settings) return; - constexpr std::array<const char*, 9> vaapiSettings = { + constexpr std::array<const char*, 10> vaapiSettings = { SETTING_VIDEOPLAYER_USEVAAPI, SETTING_VIDEOPLAYER_USEVAAPIMPEG4, SETTING_VIDEOPLAYER_USEVAAPIVC1, SETTING_VIDEOPLAYER_USEVAAPIMPEG2, SETTING_VIDEOPLAYER_USEVAAPIVP8, SETTING_VIDEOPLAYER_USEVAAPIVP9, SETTING_VIDEOPLAYER_USEVAAPIHEVC, SETTING_VIDEOPLAYER_PREFERVAAPIRENDER, - SETTING_VIDEOPLAYER_USEVAAPIAV1}; + SETTING_VIDEOPLAYER_USEVAAPIAV1, SETTING_VIDEOPLAYER_USEVAAPIAVC}; for (const auto vaapiSetting : vaapiSettings) { |