-
Notifications
You must be signed in to change notification settings - Fork 5
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
Linear light scalers can cause color shift on the output clip #90
Linear light scalers can cause color shift on the output clip #90
Comments
It seems this is more complicated than I originally thought. If I resize to a size that is much smaller than the original, then even if I attempt to manually fix the matrix with e.g.: matrix = vstools.Matrix.from_video(clip)
clip = vsscale.SSIM().scale(clip, 848, 480)
clip = clip.std.SetFrameProp(prop="_Matrix", intval=matrix) The color shifting persists. However, if I resize to a resolution that is normally in BT.709, e.g.: clip = vsscale.SSIM().scale(clip, 1280, 720) (assuming the original is 1920x1080) Then the matrix changes to BT.709, but there is no color shift, i.e. it is being fully converted to the new matrix properly. So this may be some sort of conversion issue when resizing below 1024x576. |
Can you print the props after initialize clip? By default that will not override existing props unless you force it, so maybe the clip is marked bt709 in the metadata. |
I believe I've traced down the issue, and confirmed no color shift compared to Bicubic or Merged FSRCNNX. |
Oh lol OFC, you're not specifying the curve |
Just noticed it, i'm dumb |
Should I be? I've been assuming it's optional. Though if that's the case the change I posted might need an update to work correctly if the curve is set. Edit: Actually it looks like |
Yeah the function assumes you're specifying it. |
I'm a bit lost on where should be specifying |
You totally can |
Both of those result in the following traceback (all plugins are on latest git version):
|
Huh... I wonder if this is a Vapoursynth R68 error? I don't have an instance with R66 to test against at the moment. |
Huh no you're right, I forgot i updated it |
Have you had an opportunity to investigate this? As an aside, I think a fix that automates detection of the curve correctly would be better than requiring the user to specify, unless there's a solid reason to require user intervention here. This seems like it should be able to be automated e.g. this. |
Steps to reproduce:
In the clip that is returned, the
Matrix
will have been changed to BT.709, resulting in incorrect colors in the output. This occurred with a few combinations of colorimetry settings, though not all combinations.I tested
MergedFSRCNNX
and noted that the issue is not present with that scaler.The text was updated successfully, but these errors were encountered: