I'm constantly running into this issue, which I think is red and blue clipping? Luma seems to be fine, but the only way I can get the red and blue back into range is to almost entirely desaturate the picture.
Original frame attached, as well as a Color Tools histogram from my result, which is after running ColorYUV(off_u=-11,off_v=2,cont_u=-50,cont_v=-50).
Any thoughts?
+ Reply to Thread
Results 1 to 12 of 12
-
-
If you look at where the illegal colors are you'll probably see most of them are in the halos from the analog sharpening filter, some from YV12 chroma subsampling, probably very few from real picture elements. Basically, nothing to worry about. But, as usual, you should provide a video sample.
-
Many editors have an out-of-range function. In AviSynth you can use ShowBadRGB() or HightlightBadRGB(). The former is very slow to start up (it may take a minute or more depending on the speed of your CPU) but is very accurate. The latter is fast but a little less accurate. ShowBadRGB() can be found here:
https://forum.videohelp.com/threads/360935-Capturing-Correct-Chroma-and-Hue-Levels-Fro...HS#post2289269
HighlightBadRGB() can be found a few posts later. Here's a slightly improved version:
Code:function HighlightBadRGB(clip vid, int "color") { color = default(color, $ff0000) badcolor = BlankClip(vid, color=color) Subtract(ConvertToYV24(vid), ConvertToYV24(vid).ConvertToRGB().ConvertToYV24()) absY = Overlay(ColorYUV(off_y=-126), Invert().ColorYUV(off_y=-130), mode="add") absU = Overlay(UtoY().ColorYUV(off_y=-128), UtoY().Invert().ColorYUV(off_y=-128), mode="add") absV = Overlay(VtoY().ColorYUV(off_y=-128), VtoY().Invert().ColorYUV(off_y=-128), mode="add") Overlay(absU,absV, mode="add") Overlay(last,absY, mode="add") ColorYUV(gain_y=65000) Overlay(vid,badcolor,0,0,last) }
Note that the former function shows only out of range colors, the rest of the image is black. The latter shows the image with out-of-range areas in bright red (or other specified color). -
This looks like pretty significant portions of the image to me, in the darks moreso than in the highlights.
-
Not really. Those are all from oversharpening halos, the blurry chroma of VHS, and chroma subsampling. What you want to avoid is larger areas of illegal colors. For example, if you pump up the saturation you'll see the yellow around the bird in the logo at center court becomes illegal.
If you want, you can purify some of the brights with something like:
Code:Overlay(last, last.greyscale(), mask=ColorYUV(off_y=-200).ColorYUV(gain_y=4000).Blur(1.5))
You can do something similar for dark areas. -
It's desaturating bright areas by overlaying a greyscale image over the original using a mask so that only the brightest areas are overlaid. The mask is constructed by first subtracting 200 from the Y values (everything below 200 becomes 0) then brightening the mask so that the brightest parts of what's left become 255. gain_y=4000 is roughly equivalent to multiplying by 16. So basically, in the mask, everything below 200 becomes black, every thing above 216 becomes full white.
-
And what would the equivalent for the darks be? Could I just precede the ColorYUV portion with an Invert("Y")?
What would I be looking for to tell me I need to tweak the numbers you use? -
Yes, you can do it that way. But just Invert() which inverts Y, U, and V. Only Y is used by the mask function of Overlay() so it doesn't matter what happens to U and V.
Look at the mask. I usually do something like:
Code:WhateverSource() bmask = ColorYUV(off_y=-200).ColorYUV(gain_y=4000) Interleave(last, bmask)
-
Even 200 on the low end affects way too much, almost completely desaturating the blue jerseys. And yet, there's still a ton of out-of-range stuff. How does that work if the jerseys themselves are in-range?
-
Then use a higher value. Or use further masking to protect the dark blues. Protecting dark blues will be hard because blue contributes very little to luma. RGB ramps, luma graph at top:
[Attachment 49500 - Click to enlarge]
And purifying the blacks and whites won't help at the border between red and yellow for example.
like I said, you'll always have this problem with VHS caps. Nobody bothers "fixing" it.
Similar Threads
-
overlay red?
By honikerxmckillop in forum EditingReplies: 4Last Post: 28th Feb 2019, 11:06 -
AviSynth 'Histogram' is Suspicious
By WinUser in forum Video ConversionReplies: 13Last Post: 23rd Feb 2017, 08:49 -
Does anyone use Blue-Cloner or Blue-Cloner Diamond ?
By CozUK in forum Blu-ray RippingReplies: 2Last Post: 21st May 2016, 19:03 -
Output 16:9 content to ultrawide or ultralong video walls?
By aznphatb0i in forum Newbie / General discussionsReplies: 7Last Post: 6th May 2016, 22:03 -
Ffmpeg/Ffplay: simultaneous playback of two videos, or video+histogram?
By zopiro in forum EditingReplies: 4Last Post: 19th Dec 2015, 10:44