From f127869037f50c1382424e89e0cba5ac3443c094 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 25 Jul 2016 12:16:35 +0200 Subject: [PATCH] vo_opengl: reduce default 3dlut-size to 64x64x64 Following testing after ebe798a, this is a more than sufficient size to cover our use case. The old default was a drop of about 58 dB PSNR using the old code, and this new default is about 65 dB PSNR, so it's actually an improvement despite resulting in a smaller size. There was no outlier whatsoever when comparing sizes around the 64 neighbourhood (with every step corresponding to a PSNR drop of about 0.07 dB), so I picked this since it's a power of two and requires no change to the current 3dlut-size parsing logic. I also tested smaller sizes such as 32x32x32 which performed almost as well on colorful samples, but this results in noticeable black boost in the dark regions, which is pretty undesirable. Therefore, we should avoid going much further below 64x64x64. Either way, this new size is so fast to compute that the 3dlut cache is almost useless on my end. In fact, it might even be slower to load the profile from the cache than to recompute it from scratch. (For caches on a disk. For cache on a tmpfs, it makes no difference) --- DOCS/man/vo.rst | 2 +- video/out/opengl/lcms.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index d0d47bc8c7..21341d98c6 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -1098,7 +1098,7 @@ Available video output drivers are: ``3dlut-size=xx`` Size of the 3D LUT generated from the ICC profile in each dimension. - Default is 128x256x64. + Default is 64x64x64. Sizes must be a power of two, and 512 at most. ``icc-contrast=<0-100000>`` diff --git a/video/out/opengl/lcms.c b/video/out/opengl/lcms.c index eaeb86fa8d..7cf2d42466 100644 --- a/video/out/opengl/lcms.c +++ b/video/out/opengl/lcms.c @@ -89,7 +89,7 @@ const struct m_sub_options mp_icc_conf = { }, .size = sizeof(struct mp_icc_opts), .defaults = &(const struct mp_icc_opts) { - .size_str = "128x256x64", + .size_str = "64x64x64", .intent = INTENT_RELATIVE_COLORIMETRIC, }, };