Safe Color Limiter is a "limiter" which means that it limits luma and chroma to be within the limited tv range for each and every bit depth, ranging from 8bit planar all the way up to 32bit float.
In other words,
8bit sources will be limited to 16 - 235 luma and 16 - 240 chroma
10bit sources will be limited to 64 - 940 luma and 64 - 960 chroma
12bit sources will be limited to 256 - 3760 luma and 256 - 3840 chroma
14bit sources will be limited to 1024 - 15040 luma and 1024 - 15360 chroma
16bit sources will be limited to 4096 - 60160 luma and 4096 - 61440 chroma
32bit sources will be limited to 16/255.0 - 235/255.0 luma and -112/255.0 - -112/255.0 - 112/255.0 chroma
Now, clipping values makes luma legal, but it's not the same for chroma.
For instance, it's entirely possible to have 16-240 chroma in 8bit, which is made of legal values, but it's represented as out of range in the scope.
The reason for this is relative to the intensity and not the code values in which the signal spans, in fact if you take this 12bit input (sorry Emcodem, I'm reusing the sample you sent me ages ago):
we can see that luma is slightly lower than 256, sitting at around 210, so, it's slightly out of range, and chroma slightly above 3935, so it's out of range as it's supposed to be 3840, however, if I limit the values to
Code: Select all
Limiter(min_luma=256, max_luma=3760, min_chroma=256, max_chroma=3840)
(which is what FFAStrans would do since it uses this function I made
https://github.com/FranceBB/SafeColorLimiter)
the luma is gonna be in range but the chroma is still gonna be out of range, especially in the green component and it takes a
to bring it in range.
The fact is that, technically speaking, there's nothing wrong with the current Avisynth implementation of clipping, I mean, Limiter does what is supposed to do, namely limit the range to the correct values (in this case Limited TV Range), however, that is not enough for chroma as it not only has to be in that range in terms of values in which the signal is spanning, but it also has to be inside the 75% relative intensity as per standard, so it's still out of range despite being limited to span the correct values, which is what your AutoQC suite is "complaining" about.
To make your AutoQC suite happy you would need an implementation that can also de-saturate the input signal by a certain percentage according to the specs instead of just getting rid of the illegal values (which is what SafeColorLimiter() does).