Quote:

Originally Posted by

**Jeroen1000** /forum/post/20935387

Thanks Sotti,

I think I sort of understand. Is there any reason why they have opted for a matrix (instead of just serveral 1D luts for R, G and B respectively)?

I may not have the correct mathematical vocabularly in english, but a 1D lut looks very much like a matrix to me.

I admit I would not be asking this if I'd have a full understanding. I think details like these make AVS an excellent source for those who like techie stuff

I'm a bit confused what the difference is between a LUT and a matrix.

In order to adjust hue and saturation, you'd need to adjust the opposite primaries. It's not something you can do with a 1D LUT.

Lets make up a little LUT here.

This is a basic pass through LUT.

R | 0 | 20 | 40 | 60 | 80 | 100 |

G | 0 | 20 | 40 | 60 | 80 | 100 |

B | 0 | 20 | 40 | 60 | 80 | 100 |

| 0 | 20 | 40 | 60 | 80 | 100 |

Lets say Gamma was a little low and it was also a little too green we'd have a modified LUT that would look more like:

R | 0 | 18 | 38 | 56 | 79 | 100 |

G | 0 | 17 | 36 | 53 | 77 | 96 |

B | 0 | 19 | 39 | 57 | 78 | 99 |

| 0 | 20 | 40 | 60 | 80 | 100 |

Of course a real LUT would have every value 0-100, I dropped the interim values so we'd have something easier to look at.

So this make all three primaries gamma correct they now ramp linearly and white is D65. So if you have a white input of 80,80,80 you'd get an output of 79,77,78. That's all you can do with this type of LUT. A 100% red signal would be an input of 100,0,0. In order to decrease it's saturation you'd need to add both Green and Blue. So you can see that this data structure doesn't have anyway to determine if the blue look up is simply for red saturation or where in the color space it is. It simply says blue input =0, output = 0.

So that's where the matrix comes in, which is a little to complex to describe here, but it takes the inputs and can recognize when it's dealing with 100% saturated red, or something a little closer to white and correct saturation, hue and luminance as the colors run out from the white point.

The 3D LUT instead of having 2 indexes (r,g or b, then 0-100) and storing just one value per cell has 3 indecies(0-100,0-100,0-100) and stores 3 values per cell, so instead of storing 300 single value it stores 1,000,000, triple values. Of course in the digital world it's not 0-100 it's either 8bit (0-255) or 10bit (0-1023). So for a 10 bit 3dLUT you'd have 3 axis of 1024 which means 1,073,741,824 30 bit value instead of for a 10bit 1D LUT that would have 3072 10 bit values.