my friends a huge favor this feature only applies banding to black areas would be possible to migrate the script to avisynth please
https://kageru.moe/article.php?p=adaptivegrain
Vapoursynth script
https://kageru.moe/blog/adaptivegrain.py
a lot of people fight against banding, I hope you can help us , thanks so so much
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 3 of 3
Thread
-
-
Why do you need that exact equation?
Code:z = (1 - (1.124x - 9.466x^2 + 36.624x^3 - 45.47x^4 + 18.188x^5))^(y^2 * 10)
Code:###################################################### # # Build an alpha mask that varies with average luma. # ###################################################### function GammaMaskRT(clip vid) { avg = vid.AverageLuma() gam = (avg-150)*1.4 ColorYUV(vid, gamma_y=gam).ColorYUV(gain_y=256).Invert() } ###################################################### function GammaMask(clip vid, int "adj") { adj = Default (adj, 0) ScriptClip(vid, "GammaMaskRT()") ColorYUV(gain_y=adj) } ######################################################
But I don't necessarily agree that only dark shots and dark areas need added grain. Where you need added grain is in smooth gradients, no matter how light or dark. I often see posterization in bright cyan/grey skies, for example. -
By the way, here is the basic equation:
Code:z = (1 - (1.124x - 9.466x^2 + 36.624x^3 - 45.47x^4 + 18.188x^5))^(y^2 * 10)
Code:mt_lut(mt_polish("(1 - (1.124*(x/255.0) - 9.466*((x/255.0)^2) + 36.624*((x/255.0)^3) - 45.47*((x/255.0)^4) + 18.188*((x/255.0)^5)) ) ^ ((AVG/255.0)^2 * 10) * 255.0"))
Code:AVG = AverageLuma() AVG < 128 ? mt_lut(mt_polish("(1 - (1.124*(x/255.0) - 9.466*((x/255.0)^2) + 36.624*((x/255.0)^3) - 45.47*((x/255.0)^4) + 18.188*((x/255.0)^5)) ) ^ ((180/255.0)^2 * 10) * 255.0")) \ : mt_lut(mt_polish("(1 - (1.124*(x/255.0) - 9.466*((x/255.0)^2) + 36.624*((x/255.0)^3) - 45.47*((x/255.0)^4) + 18.188*((x/255.0)^5)) ) ^ (( 85/255.0)^2 * 10) * 255.0"))
Maybe someone else knows a better way to do this.
Similar Threads
-
Qt Vapoursynth simple viewer example?
By Selur in forum ProgrammingReplies: 3Last Post: 20th Mar 2018, 11:02 -
[avisynth] what is the deinterlace method that use less CPU?
By marcorocchini in forum Newbie / General discussionsReplies: 5Last Post: 9th Nov 2015, 18:55 -
vapoursynth
By logicom in forum Video ConversionReplies: 0Last Post: 1st Dec 2014, 07:26 -
Avisynth PAL to NTSC Conversion method for best picture quality?
By VideoFanatic in forum RestorationReplies: 11Last Post: 11th Jun 2013, 09:29 -
anyone try VapourSynth yet?
By deadrats in forum EditingReplies: 0Last Post: 28th Dec 2012, 18:41