View Full Version : Experimental: MipSmooth filter
sh0dan
8th May 2003, 21:07
I finished up an experiment for a new smoother.
It is called "MipSmoother" and it is my attempt to try an alternative approach to spatial and temporal smoothing. It was originally designed for cartoons/anime, but is also provides rather good results on film IMHO.
I made a testversion, 2.5 only, YV12 only, restricted sizes, etc:
Use with latest AviSynth version for best results.
http://cultact-server.novi.dk/kpo/avisynth/MipSmooth.html
There is information about parameters, etc. on the webpage. Source is included.
Any comments are welcome!
Hi Shodan,
Sorry but it doesn't work at all here :(
My script :
LoadPlugin("C:\video\avsfilters\yv12\MPEG2Dec3.dll")
LoadPlugin("f:\test\mipsmooth.dll")
mpeg2source("F:\test\vts_03.d2v",cpu=0,idct=2)
mipsmooth()
I get an "Avisynth read error / caught an access violation at 0x0578198b, attempting to read from 0x000005a0" in VirtualdubMod
oh, and you should update the docs -> there's no function named "MipSmoother()" ;)
Regards,
FuPP.
(Athlon XP + W2K)
@sh0dan
I think the dll you've included in the zip is not your
last released; I've compiled the source and it works ok.
Arda
sh0dan
8th May 2003, 23:00
It's the brillant MSVC optimizer - anyway - put up v 0.11 and now it works on all my computers ;)
@sh0dan
I know you must be tired after such a code but
you should update the html where it says
spatialchroma it must say spatial_chroma and
where it says temporalchroma it must say temporal_chroma
Arda
cipher
8th May 2003, 23:18
Great job, sh0dan! I'm gonna hit some animes using it right away!
sh0dan
9th May 2003, 10:39
Corrected the docs - sorry - it was written in a hurry, and I wanted to get some sleep. ;)
I would like to know - in which cases does it perform well, and in which cases doesn't it perform well, and produces artifacts.
Are the default values any good, and which ones would be good for presets?
I don't have much good anime/cartoon material - most is either frefiltered or very bad caps, so I'm very interested in feedback - especially if you can provide some frames to display how it performs.
this looks interesting, thanks shodan
i think the filter causes problems with virtualdubmod and virtualdub, for some reason
e.g. if i type this script into vdubmod's avisynth script editor and hit F5 to refresh this:
a=avisource("capture.avi")
b=a.mipsmooth()
stackhorizontal(a,b)
i get script error: invalid arguments to function "mipsmooth" line 3
it doesn't raise an error when i just double-click the saved avs file from explorer, though
also, when running this script...
avisource("capture.avi")
mipsmooth()
...closing vdub with the video loaded up from the last script raises a vdub application/memory error ("the memory could not be read")
don't know if these are filter/vdub bugs
sh0dan
9th May 2003, 13:40
@wotef: Are you sure?
There is nothing special about the parameters, and your script works fine here.
ack, i tried it all again a couple of times and sometimes get those results and sometimes i don't
- so for now it must be vdub/vdubmod/my video/my pc - sorry for false alarm
i'll keep testing, though
Interesting, I wonder what I get with animes :)
I just had a few runs, seems to be pretty good for cleaning up some low level noise
This filter gave me very good results with default parameters on some very noisy DVD sources.
But for normal films, I prefered to use mipsmooth(spatial = 4, temporal = 4, spatial_chroma = 8, temporal_chroma = 10, scenechange = 5), which helped compressibility about 8% with the tested material.
I did not see any problem, neither artefacts during my tests :cool:
I though encountered a lot of crashes with virtualdub/virtualdubmod, but I am not sure what the reason is.
Nice shot(dan) ;)
Fupp.
sh0dan
9th May 2003, 18:45
There are "crash on unload" bugs in the latest AviSynth, when using crop or addborders - this could explain it - I'll see if I can get a new AviSynth up soon.
digitize
10th May 2003, 03:36
Hmmm, just a question. I myself only have a amd tbird, so I do not have sse, any reason as to why the filter requires sse, or if a version with just isse will be released, as I would really like to try out this filter.
sh0dan
10th May 2003, 07:59
Where did you get the impression it requires SSE?
(hint: The docs always said Integer SSE - I even wrote I works on your K7) ;)
digitize
10th May 2003, 16:24
@sh0dan
bleh sorry, serves me right for reading something when im 1/2 asleep, I only saw the sse, not integer in front of it. Thank you for replying, and sorry again
/me goes to test! Thanks again.
Bulletproof
11th May 2003, 03:18
Does this filter work on a matrix or does it work on full frames?
EDIT: Ok from the looks of the page it says they are compared to the original, so I'm guessing it uses a 3x3 weighting? It would be cool if you could specify that. And reduceby2 seems sort of harsh, maybe adding a parameter like a scale factor could help, like 1/2, 1/3, 1/4 etc. BTW, thanks for the filter.
Hmm, nice method :). Of course I've thought of it too once :p :rolleyes:. Will try it soon :).
sh0dan
11th May 2003, 17:58
Originally posted by Bulletproof
It would be cool if you could specify that. And reduceby2 seems sort of harsh, maybe adding a parameter like a scale factor could help, like 1/2, 1/3, 1/4 etc. BTW, thanks for the filter.
The reason it is so agressive in the downscale is to make it work on larger areas than a 3x3 matrix. I noticed that many people would like to use larger matrices, but are very speed limited when they do so.
It creates the following frames:
Current Frame, 1/2 res, 1/4 res, 1/8 res
Prev. Frame: 1/2 res, 1/4 res
Next. Frame: 1/2 res, 1/4 res
I'll add constomizable resizers to the next version - I could also add a customizable "reduce percentage" that defines how many percent each mip should be reduced. It'll be slower of course.
The final pixel blending is actually also quite different.
just about to test it now but noticed that there isnt anything about how to tweak SCD. what are the chances of an onscreen debug showing the current SCD value for that frame so we can tweak that value easier?
sh0dan
12th May 2003, 16:21
Conditional filtering to the rescue. :)
vi = last
scriptclip("subtitle(string(YDifferenceFromPrevious(vi)), align =8)")
scriptclip("subtitle(string(YDifferenceToNext(vi)), align =2)")
The previous frame is at the top - the next is at the bottom.
Remember - you might want to set lower thresholds here, so that only images without (much) movement are used.
sh0dan
12th May 2003, 21:07
LOL - just discovered:
mipsmooth(255,255,255,255,0)
Gives you the perfect happy "commercial advertisement" look - fuzzy edges. Quite funny actually. :)
(Remember to use contrasty, colorful images for best effect) :rolleyes:
Dali Lama
13th May 2003, 00:42
Originally posted by sh0dan
LOL - just discovered:
mipsmooth(255,255,255,255,0)
Gives you the perfect happy "commercial advertisement" look
- fuzzy edges.
Great! I was thinking of how this would be done for a anime
music video (AMV) I was hoping to do after finals.
You're the best sh0dan!
No...wait, now I won't be able to focus on finals!!! :D
Dali
Loul
22nd June 2003, 04:06
Can't get it to work :( :
"Evaluate: Unrecognised exception!"
(just loading a d2v file and applying the mipsmooth command).
Changing video mode (yuv2 or 12) doesn't change a thing.
sh0dan
22nd June 2003, 14:19
Try using a smaller scalefactor. Discussed in this thread (http://forum.doom9.org/showthread.php?s=&threadid=53548).
Loul
22nd June 2003, 15:03
Well I tried from 0.1 to 1.5 no change.
I sometimes also have the curious "invalid floating point operation".
I m using an Athlon XP (dunno if that could help you).
The script is pretty simple :
LoadPlugin("%PlugInPath%\mpeg2dec3.dll")
LoadPlugin("%PlugInPath%\MipSmooth.dll")
mpeg2source("L:\Dvd\UIS SmartRipper\vts_01.d2v")
mipsmooth()
#mipsmooth(downsizer="lanczos",upsizer="bilinear", scalefactor=0.1, method = "strong")
#mipsmooth(downsizer="lanczos",upsizer="bilinear", scalefactor=0.1, method = "strong")
#MipSmooth(downsizer="bilinear",scalefactor=0.50000)
#mipsmooth(3,2,2,2,5,method="soft",downsizer="bilinear",upsizer="bilinear",scalefactor=0.65)
#MipSmooth(10,10,5,10,5,method="soft")
#mipsmooth(preset = "MovieHQ")
******************
I tried all the different possibilities there, not a single one worked.
I also tried fancy things (changing mpeg2dec3.dll for mpeg2dec.dll, trying conversions from yuv12 to 2 etc.) couldn't make it work :/
sh0dan
22nd June 2003, 22:03
"invalid floating point operation"
:confused: :confused: What AviSynth version are you using??? This error should have been killed of early in the 2.51 development???
Loul
22nd June 2003, 22:26
Version() gives me :
Avisynth 2.52, build:Jun 1 2003 [23:05:51]
As I told you the "invalid floating point operation" is appearing quite rarely (maybe one time out of 20) whereas I get the "Evaluate: Unrecognised exception!" all the time.
By the way when I have the invalid floating point error, if I click in the message box I got the usual other one appearing (evaluate: ...).
Edit : Oh forgot to say that I'm using Avscompare.
sh0dan
22nd June 2003, 22:36
Strange - I'm currently working on some new stuff for 1.0 - with some additional error checking. Until then, I guess you'll have to wait! :rolleyes:
edit: Anyway - thanks for the feedback - is it ok, if I contact you later for a pre 1.0 beta test?
Loul
23rd June 2003, 03:15
Oh I'm confused here.
After some more testing (this was so puzzling) it appears that the trouble comes from Avscompare !!
When playing directly the avs script in WMP it works !
Still this is a pain as I'm comparing filters effect for denoising a film on DVD with heavy noise.
So far my "finalists" are Dust and Deen.
I wish I could test mipsmooth.
Edit : corrected my usual typos˛ ;)
BaronVlad
24th June 2003, 22:02
Hi,
"mipsmooth(255,255,255,255,0)"
is this the "I lost my glasses" option ? :D
I used the filter, looks quite good in the preview, but the encoding to XVid (high quality) was 0-1 fps on a TB 1,4. Turned off mipsmooth and got about 4 fps. I used this script to get rid off chroma:
SegmentedAviSource("H:\capture\CAPTURE.avi")
Trim(102,135361)
LoadPlugin("C:\PROGRA~1\GORDIA~1\Cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("D:\Tools\Audio-Video\Video-Encoding\AVI Synth\AviSynth v2.50\Plugins\MSharpen.dll")
LoadPlugin("D:\Tools\Audio-Video\Video-Encoding\AVI Synth\AviSynth v2.50\Plugins\MipSmooth.dll")
ComplementParity()
FieldDeinterlace(full=false,threshold=20,dthreshold=5,blend=true,chroma=true)
Crop(16,12,692,544)
Cnr2()
mipsmooth(downsizer="lanczos",upsizer="bilinear", scalefactor=2.0, method = "soft", Scenechange=4)
MSharpen(threshold=10,strength=100,mask=false,highq=true,debug=false)
lanczosresize(576,416)
limiter()
BTW: scalefactor higher 2.0 didnt work for me (I couldnt load the script), latest version of Avisynth
Mug Funky
25th June 2003, 06:21
nice idea. haven't tried it out yet :( ...
one thing that might be useful if you're doing things like percentage would be an aspect control.
a lot of footage for smoothing might be quite out of aspect (SVCD), so this would be useful. also, for VHS (especially long play) there is often a LOT more noise in the horizontal direction.
just a thought...
i'm just about to finally download and install avisynth 2.5 so i can try this. certainly seems like a nice filter.
OH! OH!... here's another idea - when selecting the resize type (bilinear, point, lanczos, etc), would it be possible to be able to specify blurring and ringing settings for bicubic? my absolute favorite resize right now is bicubicresize(width, height, 0.333, 0.333) which is the same as the mitchell netravali antialiasing filter used in 3d applications. it's nice and smooth (some would say too smooth, but mah).
again, thanks for the filter!
digitalman
28th June 2003, 04:11
I keep coming back to this filter. It is a great filter. It is a little slow though, but worth the wait.
known_03
15th October 2003, 14:31
Any filter suggests for DVD-R?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.