aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMarkus Härer <markus.haerer@gmx.net>2024-05-30 23:49:19 +0200
committerGitHub <noreply@github.com>2024-05-30 23:49:19 +0200
commit12799f87a36864358cc7b454ddaa22049c4278ca (patch)
tree64b0fc9b030ccf1313c37a175a56c13bdb228e09 /system
parentae3331815bb182918f3affb8ecf428d817bb5377 (diff)
parent0c14fb21d708719e36990213da95d71fee56400e (diff)
Merge pull request #24564 from sarbes/hq-scaler-improvement
GL: improve HQ scaler quality/performance
Diffstat (limited to 'system')
-rwxr-xr-xsystem/settings/settings.xml13
-rw-r--r--system/shaders/GL/1.5/gl_convolution-4x4.glsl5
-rw-r--r--system/shaders/GL/1.5/gl_convolution-6x6.glsl4
-rw-r--r--system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl4
4 files changed, 26 insertions, 0 deletions
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 2317cdf90c..0f559176be 100755
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -123,6 +123,19 @@
<formatlabel>14047</formatlabel>
</control>
</setting>
+ <setting id="videoplayer.hqscalerprecision" type="integer" label="39198" help="39199">
+ <requirement>HAS_GL</requirement>
+ <level>2</level>
+ <default>10</default>
+ <constraints>
+ <options>
+ <option label="39200">8</option>
+ <option label="39201">10</option>
+ <option label="39202">16</option>
+ </options>
+ </constraints>
+ <control type="spinner" format="string" />
+ </setting>
<setting id="videoplayer.usesuperresolution" type="boolean" label="13417" help="39194">
<requirement>HAS_DX</requirement>
<dependencies>
diff --git a/system/shaders/GL/1.5/gl_convolution-4x4.glsl b/system/shaders/GL/1.5/gl_convolution-4x4.glsl
index 2a6404ee01..ea1978d63a 100644
--- a/system/shaders/GL/1.5/gl_convolution-4x4.glsl
+++ b/system/shaders/GL/1.5/gl_convolution-4x4.glsl
@@ -67,5 +67,10 @@ vec4 process()
line(xystart.y + stepxy.y * 3.0, xpos, linetaps) * columntaps.a;
rgb.a = m_alpha;
+
+#if defined(KODI_GAMMA_LINEARIZATION_FAST)
+ rgb.rgb *= rgb.rgb;
+#endif
+
return rgb;
}
diff --git a/system/shaders/GL/1.5/gl_convolution-6x6.glsl b/system/shaders/GL/1.5/gl_convolution-6x6.glsl
index b4410cc184..691789d91d 100644
--- a/system/shaders/GL/1.5/gl_convolution-6x6.glsl
+++ b/system/shaders/GL/1.5/gl_convolution-6x6.glsl
@@ -79,5 +79,9 @@ vec4 process()
rgb.a = m_alpha;
+#if defined(KODI_GAMMA_LINEARIZATION_FAST)
+ rgb.rgb *= rgb.rgb;
+#endif
+
return rgb;
}
diff --git a/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl b/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl
index 7d5605c9cd..d3db2161b5 100644
--- a/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl
+++ b/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl
@@ -119,5 +119,9 @@ vec4 process()
#endif
+#if defined(KODI_GAMMA_LINEARIZATION_FAST)
+ rgb.rgb = sqrt(rgb.rgb);
+#endif
+
return rgb;
}