Closed webghost009 closed 2 years ago
After thinking a bit more about this, I am unsure if the c2 case is correct. The input to matrix() is RGBS and the output is YUV444PS. Since fulls and fulld are, according to the documentation, meaningless for float data should the range conversion requested in the call to matrix() be ignored or possibly result in an error? Or, is it perhaps intended that the state of _ColorRange is modified so that it can be applied later when/if the clip is converted to an integer format?
It is fixed now (d63d7d5be82ce856a1ccddd935cb09f2b965233e), and it will be available in the next release. For floating point formats, _ColorRange
just reflects the values passed with fulls
or fulld
, which are ignored for the actual conversion process. I’m not sure if there would be an added value to issue an error when the range is specified on a floating point format.
Great! Thank you so much for finding the time to fix this! And your reasoning for not throwing an error in the floating point case makes sense to me. I appreciate you taking the time to think about it.
I noticed that when a color range conversion is performed using bitdepth() it does not set the _ColorRange property accordingly. matrix() however does.
Here is a small repro:
Which results in the following output. Red squares indicate an unexpected value for _ColorRange while green squares indicate expected values: