View Single Post
Old 24th August 2011, 02:39   #29  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by nand chan View Post
There is currently no utility for changing the bit-depth of a LUT (eg. from 16-bit down to 8-bit) but I can add a program for that by version 0.5.
Updated, added this, in addition to re-coding most of the .3dlut code to make it much, much cleaner.

All 3dlut processing is now done using 64-bit floating point calculations at every step, and they are only converted to/from their appropriate lower-bit-depth representations when saving/loading to memory.

The .3dlut processing pipeline now only accepts functions that use normalized 0-1 doubles.

This has the advantage of: 1. Allowing for seamless interaction of .3dluts with any bit-depth and 2. level detection is now done in the .3dlut library instead of in the program, and the .3dlut lib correctly compensates for full or limited range values when pulling down the levels to 0-1 doubles.

It also removes about 70% of the code size, which was previously full of “Transform16, Transform8, Transform32” or “Pullup16, Pullup8, Pullup32” and so forth. All of these duplicate versions have now been removed and replace by generic versions that work on any-bitdepth.

Which means that I am now being bottlenecked by the limited capacity of the .3dlut file standard, even though my code is perfectly capable of processing something irregular like 10-bit LUTs (as opposed to 8, 16 or 32).

Edit: For the curious, a comparison of 16-bit LUT vs 8-bit LUT (to make madVR load it, I first converted it down to 8-bit and then converted that back up to 16-bit which is simply a bit-shift, the same way madVR converts levels). You can clearly see the advantage of greater-than-8-bit precision processing even on 8-bit devices. So if you want to use a .3dlut with avisynth be wary of this difference:

http://screenshotcomparison.com/comparison/75573

If you do want to create an 8-bit 3dLUT for avisynth etc, you can do something like this:
gen3dlut -o - -b 8 | applycal -i - -o output.3dlut calibration.cal
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management

Last edited by nand chan; 24th August 2011 at 02:48.
nand chan is offline   Reply With Quote