View Full Version : AddGrain
HolyWu
21st August 2014, 17:29
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-AddGrain
foxyshadis
21st August 2014, 20:24
AddGrain is destructive enough that it probably wouldn't matter if you just zeroed the LSB out or replaced it with the output of the linear congruential generator already built into the filter, unless you have a very, very tiny variance. For future optimization work, you can generate the noise pattern to match the bitdepth, so that you can ignore bitdepth entirely during the getframe and just add them together directly like the Avisynth version. Getting into whether to destroy LSB entirely is a bit trickier, but it'd be even faster.
Looks like it should work as-is though.
Reel.Deel
24th August 2014, 16:41
@HolyWu
Thanks for all you efforts! I guess is now possible for a native GrainFactory3 http://www.millan.net/minimations/smileys/fiesta.gif
HolyWu
9th June 2015, 18:29
Update r5.
Support 32-bit float input.
HolyWu
19th June 2020, 14:47
Update r8.
Fix pixel rounding issue in integer formats.
Add SSE2, AVX2 and AVX512 optimizations.
Selur
19th June 2020, 19:34
Thanks :)
Cary Knoop
7th July 2020, 07:04
Did anyone think about using grain applied with motion-compensated vectors, it could improve perceptual resolution.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.