I am working on a video that has poor colors. After some fiddling with photoshop I figured it could use a small bump in contrast and a small decrease in brightness. However after trying to use Tweak(0.0, 1.0, -15.0, 1.1) I've noticed that its effect is nowhere near what I am expecting. Contrast particulary doesn't appear to scale the way it does with photoshop. Is there a better option than tweak or a setting I'm overlooking?
Another good slider that photoshop provides is "color vibrance" but I have no clue how that could translate in AviSynth. Any pointers? Thank you.
Unfortunately I cannot exactly provide a reference frame from the source due to the nature of the content.
+ Reply to Thread
Results 1 to 11 of 11
I don't use the program but analyzing this help video:
Brightness and Contrast mean different things in AviSynth. AviSynth uses video (TV) terminology rather than photographer's terminology. In Tweak Contrast is a gain (Y' = Y*Contrast) and brightness is an offset (Y'=Y+Brightness). Photoshop's Brightness is similarTweak's Contrast. Photoshop's Contrast is a combination of Contrast and Brightness in Tweak. I recommend you just fiddle with the values until you get what you want.
Other possible issues:
Photoshop may be working in RGB, whereas Tweak works in YUV. Results will be different in that case.
You may have YUV/RGB conversion differences: full range vs limited range (effect black and white levels), and rec.601 vs rec.709 (effects colors).
Oh, also, Tweak limits Y values to standard "limited range" levels by default (16 to 235). Use coring=false to prevent that.
Last edited by jagabo; 4th Dec 2020 at 12:44.
OK I've managed to make a comparison between Tweak and Photoshop, both with an exagerated bump in contrast, as you can see the results are nowhere near. It's not so much an issue with the scaling as it is an issue with the effect it's having on the picture.
[Attachment 56071 - Click to enlarge]
Unfortunately it's a little painful to fiddle with Tweak, as I have to write the script manually and reload each time in VirtualDub... maybe there's a way to have a GUI showing real time effect of the filter?
There are no conversions in the script either, but you are correct in the fact that Tweak works in YUV only, so it may be the issue. What then could I use to obtain the desired effect?
Also, Adobe's "contrast" uses the actual center point for the contrast. Tweak's contrast center equivalent is somewhere in the shadows and works entirely differently. It just changes the slope of the curve with a fixed origin point at zero.
You can use Dither_sigmoid_direct and Dither_sigmoid_inverse from dither tools to adjust increase or decrease contrast similar to Adobe , and also the contrast center (by default 0.5 or center) . The avs version only works with stacked 16bit msb/lsb, not native 16bit or other pixel formats
If you look at the graph in this post , the s-curve (and inverse s-curve for lowering contrast) , with a center point in the middle by default is how most NLE's work with "contrast" . You can adjust the contrast midpoint
[Attachment 56072 - Click to enlarge]
dither_sigmoid_direct is having this very weird effect what gives? I'm using 1.28. Full script for reference.
DGSource("D:\Ripping\VOB\STREAM\00000.dgi") AssumeTFF() QTGMC(preset="fast") Dither_sigmoid_direct(cont=6.5)
It uses stacked 16, you can't use it directly on 8bit
It would be something like this for the syntax for stacked16, going back to 8bit
. . Dither_convert_8_to_16() Dither_sigmoid_direct(settings....) ditherpost(mode=whatever) . .
This is semi-close, the highlights in the skin detail are a bit off
ImageSource("compare.png") spline16resize(width/3 , height/3) crop(1017,0,0,0,true) converttoyv24(matrix="rec709") histogram("levels") c1=last ImageSource("compare.png") spline16resize(width/3 , height/3) crop(0,0,-1017,0,true) converttoyv24(matrix="rec709") orig=last orig.greyscale() Dither_convert_8_to_16() Dither_sigmoid_direct(cont=2.5, thr=0.53, u=2, v=2) ditherpost(mode=6) y=last orig.utoy Dither_convert_8_to_16() Dither_sigmoid_direct(cont=3, thr=0.5) ditherpost(mode=6) u=last orig.vtoy Dither_convert_8_to_16() Dither_sigmoid_direct(cont=3, thr=0.5) ditherpost(mode=6) v=last YToUV(u,v) MergeLuma(y) smoothlevels(0,1,255,0,252, chroma=0) subtitle("avs") histogram("levels") c2=last stackhorizontal(c1,c2)
[Attachment 56073 - Click to enlarge]
Another way you could do it is export a cube LUT from photoshop or image editor ,the apply the LUT in avisynth (using avscube), but this works in RGB too
I see, I can work with that thank you very much for your help.
A simple RGBAdjust(r=1.10, g=1.10, b=1.10, rb=-14, gb=-14, bb=-14) is pretty close. Or Tweak(cont=1.08, bright=-9, sat=1.25, coring=true) in rec.709 YUV.
Last edited by jagabo; 4th Dec 2020 at 21:31.