-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior change in Greyscale #257
Comments
Hi, |
I think it was intentional since the matrix parameter in Greyscale is only for RGB sources. The matrix only specified what coefficients to use but was always in full range. |
O.K. matrix is always for RGB source but the target would either be full or limited, but in this case it is always full. |
That's the way Greyscale for RGB has always worked. Maybe since limited range RGB is rare? For YUV, the matrix does not make sense in Greyscale since all it does is set the chroma planes to neutral. Greyscale for RGB is just a more efficient way of doing this:
Edit: I guess if you wanted to have a full/limited option for Greyscale, the best way would be to add an extra parameter (full=true)?. I'm sure there are scripts in the wild that use Greyscale on RGB and having the "RecXXX" matrices be limited range does affect who ever is using said scripts. I would never have a need for limited ranged RGB, but just throwing it out there :) |
Yep, I see, it's fed back into the same RGB format. "without changing the color format." |
(gee, mentioning Fix #257 in the commit message will automatically close the issue.) |
Thanks for taking a look at the issue and fixing it. Just one last thing, I think the original error message was more helpful/less confusing:
|
I was thinking on it but a "matrix" can accept new string constants everywhere (e.g. "709", "170m", "fcc", etc.), so we are not limited to the old legacy values. |
Yeah, I saw that when I was updating the Convert page some days ago. I thought it was only for the convert functions. I just tried the new style matrix in Greyscale and they also work. Interesting. Ok, so next question. From my understanding, "Rec601", "Rec709", "Rec2020" in Greyscale will always be full range (for compatibility reasons). But now that it supports the new style matrix also, e.g. "709:full", does that mean that any valid combinations can be used for Greyscale going forward? For example, if a user wants to use "709:limited", the result will be limited range RGB. Sorry for all of the questions, I just want to make sure I understand what is going on so I can document it. |
Forced 'limited' range stuffed back into RGB with a mean of a special syntax? Probably not. New style "matrix" definitions default to limited if only matrix is given, but RGB implies that the result will automatically converted back to full range before put in R, G and B planes. Greyscale easy syntax would require only matrix. E.g. "fcc" is translated to "fcc:limited". Matrix can be spefified w/o ":l" ":limited" ":f" ":full" and that's enough for GreyScale to understand the intent. The main question is to make this consistent; I think filter must ask for limited range syntax (as it worked so far) and it would mean a full scale Y representation in RGB. (again, as it worked traditionally). |
Thanks, fixed. I'm waiting a bit further for other possible issues, so I'm not going to provide a build right now. |
No worries, I'm still busy testing other things :) |
Should these 2 methods be identical? I was under the impression they would be, but they are not.
But then I found out the behavior has changed:
"PC601"/"PC.601", "PC709"/"PC.709", "PC2020"/"PC.2020"
are now accepted values for matrix and produce full range RGB greyscale."Rec601"/"Rec.601", "Rec709"/"Rec.709", "Rec2020"/"Rec.2020"
now produce limited range RGB greyscale."Average"
remains the same.Before this change, Greyscale always produced full range RGB. This affects some scripts that use Greyscale on RGB clips since only
"Rec601", "Rec709", "Rec2020"
were allowed.The text was updated successfully, but these errors were encountered: