View Full Version : New versions of FillMargins and AddGrain filters
trbarry
18th June 2003, 21:46
I today posted an updated version of my FillMargins filter that corrects a typical trbarry OBO error sometimes causing green specks in a corner. I also try to make it blend the top and bottom margins a bit to make them less obtrusive, but it really doesn't seem to have much effect.
I also posted a new AddGrain filter. This uses some of SansGrip's noise generator code to add a film-like grain to a video clip. The noise can be optionally correlated in the horizontal and/or vertical directions, causing various streaks & clumps.
And I today even found a setting that can make any scene look like it is raining. See the readme.
Get the files (including source) at:
www.trbarry.com/FillMargins.zip
www.trbarry.com/AddGrain.zip
And please let me know if busted something.
- Tom
sh0dan
19th June 2003, 07:33
Great to see you get some time to finish up all those things!
I'm not quite sure I get the blending idea behind the FillMargins improvement - but it worked nicely already. :)
I assume AddGrain is the usual "Trbarry, Faster than H*ll" type of filter?
trbarry
19th June 2003, 16:37
I assume AddGrain is the usual "Trbarry, Faster than H*ll" type of filter?
Sh0dan -
I haven't tested the speed, but hopefully it should run in negligable time, faster than UnDot for instance.
- Tom
(I didn't invent assembler. I just use it ;) )
trbarry
19th June 2003, 16:45
Great to see you get some time to finish up all those things!
Sh0dan -
I tend to work on these things sort of off and on. And I'm not very organized about it.
But it seemed there was some other issue/bug that you pointed out on one of my filters that I had promised to fix. Any idea what? Don't I still owe you one?
- Tom
sh0dan
19th June 2003, 17:27
It was the Of-By-One bug in FillMargins. :)
trbarry
19th June 2003, 17:42
Doh!
- Tom
dar1us
26th August 2003, 22:34
Firstly I must say that I love, it is fast as hell. Good job old boy!
Could I make a request on for a new version of AddGrain Mr. Barry; I would love it if there was a setting that you could configure to tell the AddGrain filter to add every other frame or so, this will make the noise seem less violent. Adding noise to all frames rather, just the same pattern or random (pattern of random, a SLIGHT ;Oxymoron to say the least:D), that is a to have the same noise over two frames then to change it... AddGrain currently as I said is great and gets included in basically all scripts of mine to bring out the shine... It just seems a little fast paced movement. I am sure that that is very little work to do and I would love it if you could make it so.
Additional (not that important): YUY2 support...?
Sorry if I sould a little bold and asking you is taking rather a liberty.
harrison
trbarry
27th August 2003, 02:28
ld I make a request on for a new version of AddGrain Mr. Barry; I would love it if there was a setting that you could configure to tell the AddGrain filter to add every other frame or so, this will make the noise seem less violent.
I'm not sure I understand the request. AddGrain should already give a different pattern of noise on each frame. For performance it doesn't really redo all the random numbers each time. It just starts with a very big buffer of noise and picks a different random starting location for each frame to make them all look different.
Does it need more than this?
- Tom
sh0dan
27th August 2003, 09:04
I seem to remember that ffdshow only updates the noise pattern every second frame.
Furthermore it could also be a nice feature, if the noise pattern was seeded by the frame number, so that frames are consistent, as long as the framenumbers are the same.
Just suggestions - I only rarely use the filter, so it isn't a big issue for me personally.
dar1us
28th August 2003, 01:55
As shodan mentioned, it ffdshow keeps the noise patternt for 2 frames each time.
In the AddGrain currently, it changes the noise pattern every frame. Would it be possible to keep the same noise pattern over 2 frames, then an equally random pattern for the next.
Sorry if you couldn't understand me lastime, I was babling and I was rather tired. I started cycling from Cambridge and the next thing I knew I was on the other side of London, I have no idea how I managed that. I was really knackerd:P so was very confused by what I was saying myself and just hoping that you could make more sense than me out of it. I think that the rephrase will suffice.
harrison
trbarry
1st September 2003, 17:48
Sorry, been moving and without net access for a few days.
I'll take a look at the reproducibility thing.
But I'm still not sure why changing the noise every 2 frames is special in any way except that ffdshow does it. Does it have something to do with PAL movies showing each frame twice at 50 Hz?
- Tom
mf
1st September 2003, 18:05
As I've been interested in detail approximation (see filter DetailIllusion), I'd like to request temporal correlation. Denoising a noised image is not really effective, and since the noise is created around existing values I can't process it seperately. My goal is to create "static noise" that only changes when movement occurs.
Sparktank
16th February 2017, 02:10
Ancient bump... *ahem*
But would it be possible if someone can upgrade this from MMX to AVX or even SSE2?
http://avisynth.nl/index.php/FillMargins
Would there even be a difference?
Motenai Yoda
16th February 2017, 02:36
Ancient bump... *ahem*
But would it be possible if someone can upgrade this from MMX to AVX or even SSE2?
http://avisynth.nl/index.php/FillMargins
Would there even be a difference?
IINW FillMargins doesn't do more than "expand" the inner row/coloumn, it should be done using bilinearresize()
Reel.Deel
16th February 2017, 03:16
Have not compared speeds but jackoneill made FillBorders (https://github.com/dubhater/vapoursynth-fillborders) for VapourSynth which has a fillmargins mode:
Fills the borders exactly like the Avisynth filter FillMargins, version 1.0.2.0. This mode is similar to "repeat", except that each pixel at the top and bottom borders is filled with a weighted average of its three neighbours from the previous line.
Maybe someone can backport it to AVS.
There's also BorderControl (http://avisynth.nl/index.php/BorderControl) which has many settings and can probably do the same as FillMargins.
Regardless, I think it would be great if someone updated FillMargins to support additional colorspaces in AVS 2.6/ AVS+.
jackoneill
24th February 2017, 16:34
Ancient bump... *ahem*
But would it be possible if someone can upgrade this from MMX to AVX or even SSE2?
http://avisynth.nl/index.php/FillMargins
Would there even be a difference?
The MMX code itself is likely pointless, unless maybe you have very large borders to fill (a good percentage of the image).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.