summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/video_shaders.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-07-18 15:35:13 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-09-01 21:02:19 +0200
commitb4c98cb04c87999eccd061cc59e6f5f8fa706220 (patch)
treee4b5f79aa7f341b6292286695abce76c43e1c7e1 /video/out/gpu/video_shaders.c
parenteca51d8e4593685638cd3384452cedfd1c1448c2 (diff)
downloadmpv-b4c98cb04c87999eccd061cc59e6f5f8fa706220.tar.bz2
mpv-b4c98cb04c87999eccd061cc59e6f5f8fa706220.tar.xz
vo_gpu: remove --tone-mapping-mode
`--vo=gpu-next` no longer uses this option, being replaced entirely by a luminance-based approach internally. And even for `--vo=gpu`, the values other than 'hybrid' are universally inferior in quality. In the interest of gradually reducing the amount of option bloat here, remove this mostly-pointless option.
Diffstat (limited to 'video/out/gpu/video_shaders.c')
-rw-r--r--video/out/gpu/video_shaders.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c
index 260d0afb3d..4b4c13bd84 100644
--- a/video/out/gpu/video_shaders.c
+++ b/video/out/gpu/video_shaders.c
@@ -818,25 +818,12 @@ static void pass_tone_map(struct gl_shader_cache *sc,
abort();
}
- switch (opts->mode) {
- case TONE_MAP_MODE_RGB:
- GLSL(color.rgb = sig;)
- break;
- case TONE_MAP_MODE_MAX:
- GLSL(color.rgb *= sig[sig_idx] / sig_orig;)
- break;
- case TONE_MAP_MODE_AUTO:
- case TONE_MAP_MODE_HYBRID:
- GLSLF("float coeff = max(sig[sig_idx] - %f, 1e-6) / \n"
- " max(sig[sig_idx], 1.0); \n"
- "coeff = %f * pow(coeff / %f, %f); \n"
- "color.rgb *= sig[sig_idx] / sig_orig; \n"
- "color.rgb = mix(color.rgb, %f * sig, coeff); \n",
- 0.18 / dst_scale, 0.90, dst_scale, 0.20, dst_scale);
- break;
- default:
- abort();
- }
+ GLSLF("float coeff = max(sig[sig_idx] - %f, 1e-6) / \n"
+ " max(sig[sig_idx], 1.0); \n"
+ "coeff = %f * pow(coeff / %f, %f); \n"
+ "color.rgb *= sig[sig_idx] / sig_orig; \n"
+ "color.rgb = mix(color.rgb, %f * sig, coeff); \n",
+ 0.18 / dst_scale, 0.90, dst_scale, 0.20, dst_scale);
}
// Map colors from one source space to another. These source spaces must be