Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
7th December 2017, 10:55 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Different saturation adjusting filters vary in red
I did saturation adjustment in Color Finesse in Adobe Premiere and I wanted to reproduce the result in vapoursynth. So I did some tests comparing different hsl filters in the vapoursynth/avisynth/virtualdub pool to see how close they are. In my test I took a sample image and test it on all filters with 50% saturation.
In the results, the Tweak() in vs and avs, and the internal hsv filter and the 6-axis color correction filter in virtualdub are all identical. The only one that's visibly different is Color Mill. When compares to the result of Color Finesse, the previous four looks very much the same in every color except red, as you can see in the samples: color finesse vapoursynth color mill Why are the difference only in red? |
7th December 2017, 12:40 | #2 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
All three look quite different to me. The vapoursynth image is YUV while the other two are RGB. How were the screenshots saved?
Compared to the first two, I think there's a rec.601 conversion that should've happened for the third image, but didn't. The difference between one and two seems to be a difference in luminance levels and/or saturation. It's nowhere near a full TV vs PC levels difference, but the second image is a little darker than the first. |
7th December 2017, 13:29 | #3 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
7th December 2017, 17:45 | #4 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Here is the original screenshot that was saved by loading the ts file into vapoursythn, and then saving it as png in vs editor
original Code:
clip = core.ffms2.Source(r'00020.m2ts') Code:
# vapoursynth, result image save directly from the same script as load the ts clip = adjust.Tweak(clip, sat=0.5) # avisynth, result image save from avspmod ImageSource("17040.png") converttoyv12(matrix="rec709") SmoothTweak(saturation=0.5) #tweak(sat=0.5) For Color mill, I loaded the original png into Virtualdub, loaded the color mill filter and set "saturation->stick->-50". The result image was saved to png from "file->export->single image". |
7th December 2017, 19:07 | #5 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
All I can tell you at this point is if I open the "original" image in Irfanview and reduce the saturation by 128 I'm not sure I can distinguish it from the color finesse screenshot. That makes the vapoursynth screenshot a little darker than the "original" and I'm sticking with my rec.601 theory for the color mill screenshot, although converting the colours doesn't make it the same as "original", maybe just less different, so either I'm wrong or there's something else happening there.
Last edited by hello_hello; 7th December 2017 at 19:12. |
7th December 2017, 21:32 | #6 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
I also thought that maybe color finesse also uses a slightly different algorithm from the mainstream, but then you said Irfanview can produces an identical result... As I dig deeper, I saw that GIMP is also identical to photoshop/premiere, and an online photo editor at befunky.com produces identical result to vs/avs/vd... So there is like three different algorithms for saturation on the market right now? |
|
7th December 2017, 22:36 | #7 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
There's definitely a difference between Tweak(sat=0.5) and reducing the saturation by 127 with Irfanview. I can easily see it when I use the following on your original image.
ConvertToYV12(matrix="rec709") Tweak(Sat=0.50, coring=false) I'm wondering if it's somehow gamma related. By reducing the gamma to 90% with Irfanview while reducing the saturation by a little more than 50% I can get it fairly close to what Tweak does, but I still haven't managed to find a combination that produces the same result. Edit: No, after a bit more playing around I don't think it's gamma. Tweak(sat=0.52) is closer to Irfanview's 50% although reds still aren't the same. Last edited by hello_hello; 7th December 2017 at 23:22. |
8th December 2017, 18:22 | #9 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Some more observations:
Using a RGB source, - Color Finesse 3 different as tweak (converted to RGB using 709) as you reported - Colorista 3 gives same results as tweak - Lumetri gives something completely different than those - AE's internal Hue/Saturation filter or colorbalance HLS completely different but same as each other It has something to do with brightness compensation calc because a 191 red bar becomes 41,41,41 with complete desaturation for colorista but 57,57,57 with color finesse, 95,95,95 with internal h/s filter or colorbalance hls |
8th December 2017, 19:43 | #10 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
There should be a RGB and a YUV version of the HLS filter. Both producing different result because of different calculation. In Premiere, if I'm not mistaken, all the effect filters are RGB unless there is a "yuv" icon next to the name. The yuv "fast color corrector" in Premiere produces identical result to color finesse and irfanview, which indicate that the latter two are also using the yuv version. While the rgb "color balance (HLS)" gives identical result as photoshop and gimp. So we can separate them into 3 groups now: Code:
RGB HLS: Photoshop / GIMP / PP's HLS YUV HLS: Color Finesse / IrfanView / PP's Fast Color Corrector YUV HLS(2): Vapoursynth's Tweak / Avisynth's Tweak / VD's HSV Adjust / VD's 6-axis Color Correction, Befunky's Photo Editor, DaVinci Resolve update: added davinci resolve Last edited by lansing; 8th December 2017 at 22:48. Reason: added resolve to group |
|
8th December 2017, 20:56 | #11 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
I don't know if you can really call it a "flaw" ... it's just another method of defining and calculating "saturation". The commercial Colorista produces identical results as tweak, but using RGB input source. So if it's a "flaw", it has it too. I guess we could check a bunch of other commercial programs. Resolve would usually be considered the "gold standard" for video color work In old thread, they discussed how to adjust RGB saturation in avisynth https://forum.doom9.org/showthread.php?t=87439 I vaguely recall someone explaining all these differences a long time ago... somewhere... maybe it was Gavino Last edited by poisondeathray; 8th December 2017 at 21:03. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|