User guide
A-13
Appendix
2
1
3
4
6
5
7
8
9
I
A
A.4 1D LUT Files
A one-dimensional look-up table (1D LUT) file defines values for color
and/or gamma correction. Depending on the color depth, for each in-
put value the file specifies an output value for each color component
and the alpha channel (key). It is a plain ASCII text file that has to match
the following properties:
– Lines starting with a hash (#) are comments and will not be evalu-
ated.
– There is a designated line (designated with the color depth) for the
four color component values (RGBA). For example, for 10 bit video
data the lines will start with zero (0) and end with 1023.
– Each designated line consists of four values (RGBA). The separation
is made via tabulators ([TAB]).
– The LUT file has to provide 1024 × 5 input/output values as used in
10 bit video mode. If you work with 8 bit video data, only every
fourth value will be used from the LUT.
– The values have to be in incrementing order.
– The color component values have to be stated as floating point val-
ues between zero (0) and one (1).
After some comments, for example, about the file and its values the file
starts to list the color correction values. Each line starts with the desig-
nation of the input value (bit depth), succeeded by the four color com-
ponent values: first blue, second green, then red, and last the alpha
channel.
This leads to the following syntax:
A finished and complete LUT file may look like the following (value
pairs in the middle left out):
# Any comment
# Any comment
<input value> <B> <G> <R> <A>
# Any comment
# Any comment
0 0.009766 0.000000 0.000000 0.0
1 0.011719 0.000000 0.000000 0.0
2 0.013672 0.000000 0.000000 0.0
3 0.015625 0.001953 0.000000 0.0
4 0.017578 0.003906 0.000000 0.0
5 0.019531 0.005859 0.000000 0.0
...
1022 0.999023 0.988281 0.999023 0.0
1023 0.999023 0.991211 0.999023 0.0