summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2016-07-25 10:18:41 +0200
committerwm4 <wm4@nowhere>2016-07-25 10:26:45 +0200
commitebe798a333fe547b77a5c0169a7fd8aadf8b8beb (patch)
tree774620105f7f9a3d5cceb7520c9ba469bec75490 /audio
parentdcfde2934dd7b5401b29d6a604fa3eca1b867d5c (diff)
downloadmpv-ebe798a333fe547b77a5c0169a7fd8aadf8b8beb.tar.bz2
mpv-ebe798a333fe547b77a5c0169a7fd8aadf8b8beb.tar.xz
vo_opengl: increase 3DLUT accuracy at lower LUT sizes
This code had the exact same texture indexing bug that the original scaler code had before the introduction of the LUT_POS macro to fix it. We can re-use this same macro here, and the performance drop is virtually entirely negligible. The benefit is greatly improved LUT accuracy as the 3DLUT size decreases - in particular, the old LUT started introducing more and more black crush the lower your LUT size is (because the error was essentially an over-contrast bias, with a magnitude linearly related to the lut size). The new code improves black stability as the LUT size decreases, and only at very low values (16 and below) do black levels start noticeably getting affected (due to crude linearization of the nonlinear response curve). The default value of 3dlut-size is definitely generous enough for this to make no difference out of the box, but it also causes no performance drop at all on my machine so I see no harm in improving the logic. Furthermore, this means we could easily decrease the default 3dlut size in a future commit, perhaps even down to 64x64x64 as a default. (But more testing is warranted here)
Diffstat (limited to 'audio')
0 files changed, 0 insertions, 0 deletions