diff options
author | CrystalP <crystalp@kodi.tv> | 2023-06-23 20:14:23 -0400 |
---|---|---|
committer | CrystalP <crystalp@kodi.tv> | 2023-06-25 12:43:16 -0400 |
commit | 4a6f039d9b00694e986bac965b0dd075fb639373 (patch) | |
tree | cd02d2fc02c8828c61e9bb4a1b185f5049ac34b5 | |
parent | 39334002ce19186aad8c6cd940ae5fcdd224076b (diff) |
[Windows] Add high precision processing setting
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 13 | ||||
-rwxr-xr-x | system/settings/settings.xml | 6 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp | 10 | ||||
-rw-r--r-- | xbmc/settings/Settings.h | 1 |
4 files changed, 27 insertions, 3 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 062d3afd2b..e12064f9ff 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -7211,7 +7211,12 @@ msgctxt "#13417" msgid "Allow use DXVA Video Super Resolution" msgstr "" -#empty string 13418 +#. Setting Player / Video +#: system/settings/settings.xml +#: xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp +msgctxt "#13418" +msgid "Use high precision processing" +msgstr "" #: system/settings/settings.xml #: xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.cpp @@ -23453,3 +23458,9 @@ msgstr "" msgctxt "#39194" msgid "Enables advanced DXVA upscaler using NVIDIA \"RTX Video Super Resolution\" or \"Intel Video Super Resolution\".[CR]Used when video source is 1080p or less (progressive only) and source resolution is lower than display resolution.[CR]It's only available on specific hardware: NVIDIA RTX 40x, RTX 30x and Intel Arc A770, A750." msgstr "" + +#. Description of setting with label #13418 "Use high precision processing" +#: system/settings/settings.xml +msgctxt "#39195" +msgid "Enable this option for the best picture quality. Disabling reduces the load on resource-limited systems." +msgstr "" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index e1d5ec1b39..3054b9a33a 100755 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -173,6 +173,12 @@ <default>true</default> <control type="toggle" /> </setting> + <setting id="videoplayer.highprecision" type="boolean" label="13418" help="39195"> + <requirement>HAS_DX</requirement> + <level>2</level> + <default>true</default> + <control type="toggle" /> + </setting> </group> <group id="4" label="14232"> <setting id="videoplayer.stereoscopicplaybackmode" type="integer" label="36520" help="36537"> diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp index c8326738a4..a26bef9655 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererBase.cpp @@ -341,8 +341,14 @@ bool CRendererBase::CreateIntermediateTarget(unsigned width, bool dynamic, DXGI_FORMAT format) { - // No format specified by renderer > mirror swap chain's backbuffer format - if (format == DXGI_FORMAT_UNKNOWN) + // No format specified by renderer or high precision disabled > mirror swap chain's backbuffer format + const auto settings = CServiceBroker::GetSettingsComponent()->GetSettings(); + + if (!settings) + return false; + + if (format == DXGI_FORMAT_UNKNOWN || + !settings->GetBool(CSettings::SETTING_VIDEOPLAYER_HIGHPRECISIONPROCESSING)) format = DX::Windowing()->GetBackBuffer().GetFormat(); // don't create new one if it exists with requested size and format diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index a4f91e9f92..3a1aa6a662 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -114,6 +114,7 @@ public: static constexpr auto SETTING_VIDEOPLAYER_RENDERMETHOD = "videoplayer.rendermethod"; static constexpr auto SETTING_VIDEOPLAYER_HQSCALERS = "videoplayer.hqscalers"; static constexpr auto SETTING_VIDEOPLAYER_USESUPERRESOLUTION = "videoplayer.usesuperresolution"; + static constexpr auto SETTING_VIDEOPLAYER_HIGHPRECISIONPROCESSING = "videoplayer.highprecision"; static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODEC = "videoplayer.usemediacodec"; static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE = "videoplayer.usemediacodecsurface"; |