#12848 (Enhancement) Allow selection of .3dl sample points
When generating an n-by-n 3D LUT in .3dl format with m-bit input, the sample points are obtained by evenly diving the interval [0, 2^m - 1] into n-1 subintervals, then rounding the endpoints of the subintervals to the nearest integer. So, for example, a 17-by-17 LUT with 10-bit input has samples at points
0, 64, 128, 192, 256, 320, 384, 448, 512, 575, 639, 703, 767, 831, 895, 959, 1023
However, I'm working with an application that requires samples at
0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1023
in this case (henceforth "ceiling points", because these points can be obtained by taking the smallest integer >= each endpoint instead of rounding). It would therefore be useful to be able to somehow specify these points as an alternative.
My specific application is using CalMAN to install a DisplayCAL-generated LUT in a 2018 LG TV, and the specific 3D LUT sizes supported are 17-by-17 (for IPS and B-series OLED TVs) and 33-by-33 (for higher-end OLED models), both using 10-bit input and 12-bit output, but only accepts .3dl files with ceiling points.
As an aside, the Lustre manual cited by the DisplayCAL uses the above set of ceiling points as an example on page 8, so this doesn't appear to be a particular quirk of LG TVs and/or CalMAN.
I'd attach a patch, but I can't think of a simple UI for this feature that doesn't involve knowing what applications require or prefer one or the other sets of sample points.
Finally, note that, for practical purposes, this problem can be solved by hacking one line of the DisplayCAL source to output ceiling points instead of rounded points in the .3dl header; the main reason I'm requesting this enhancement is so I can explain how to use DisplayCAL to generate LG 3D LUTs to others without requiring either code changes or edits to the resulting .3dl file.
As a distant second reason, output values should also be calculated from input values at the input points implied by the header, rather than at the actual (floating-point) endpoints or the rounded points, though I imagine this would only lead to visible differences in pathological cases.
Reports (application/zip | 2018-07-19 18:50:31)