PDA

View Full Version : MipSmooth 1.0 released


sh0dan
12th October 2003, 12:50
Hi folks!

I pulled myself together and implemented a new idea into MipSmooth, along with some bugfixes, speedup and adjustments. I'm quite happy with the filter now, and see it as a good replacement for smartsmooth, C3D and a supplement to VagueDenoiser.

Changelist:

v1.0
* Two new SuperMip modes. These mode reduces artifacts greatly.
* Massive speedup - this requires an AviSynth dated October 11th or later. This will give a >100% speedup.
* Scenechange values can be float values.
* Presets adjusted (preserves more detail in general).
* Fixed: Nasty bug that provided wrong thresholds on first mip. Quality improved!
* Fixed: Mips have a minimum size (16x16 pixels) to avoid resizer crashes.
* Added resolution checks to avoid crashes.


As it has hit v1.0 I now see it as "production ready", and with the latest cvs binary it is also quite speedy. It can also be used for a nice gaussian-like blur.

Download from: http://cultact-server.novi.dk/kpo/avisynth/mipsmooth.html.

Feel free to post any experiences or problems here.

jorel
12th October 2003, 15:06
thanks sh0dan!
i was waiting for this great news!
:)

Chainmax
12th October 2003, 21:42
'tis some very nice news indeed. I have a question, though:
this requires an AviSynth dated October 11th or later.
I don't get this. Isn't there only one version of Avisynth v2.52 (from 2003-05-31)?

Dreassica
12th October 2003, 22:09
Check Shodan's sig, u'll see a link to a site with CVS binaries. One of the files there is a test version released 11th october. get that for the speed improvement. :D

cipher
12th October 2003, 22:34
WOWOWOWOW!!
thx for your great work, sh0dan!

* Massive speedup - this requires an AviSynth dated October 11th or later. This will give a >100% speedup.
* Fixed: Nasty bug that provided wrong thresholds on first mip. Quality improved!

:D

digitalman
13th October 2003, 13:06
This filter is unbelievable on low bitrate DVDs. I usually put two movies on one DVD+R, so the VBR is around 2000-2500Kbps. They almost look better than the original!!!

Dams
13th October 2003, 14:13
what do u mean by "low bitrate DVDs" ?

digitalman
13th October 2003, 14:44
Usually DVDs are over 4000Kbps Variable Bit Rate. Most people on this board consider a low bitrate around 2000Kbps VBR for DVDs.
Also, I would like to add that I tried the latest and greatest filter Vague Denoiser with the low bitrates, and Mipsmooth does a superior job.

Dams
13th October 2003, 15:04
oki

Wilbert
13th October 2003, 15:09
This filter is unbelievable on low bitrate DVDs. I usually put two movies on one DVD+R, so the VBR is around 2000-2500Kbps. They almost look better than the original!!!
Just curious. Why is this filter any better than (say) convolution3d(preset="movieHQ") considering the source and target?

digitalman
13th October 2003, 18:31
(I should have added that I use UNDOT() before Mipsmooth)
There are less artifacts, which is noticeable when comparing to Convolution3d, and the picture looks a little sharper. I do not do any resizing or cropping. Maybe it is just my eyes and opinion, but it just looks better to me. Okay, maybe it doesn't look better than the original, but it still looks awesome. Could be the new SuperSoft setting that is used in Mipsmooth. Maybe at higher bitrates there is no difference between Convolution3d and Mipsmooth, since the source is already clean, but at the bitrate I use, I can see a difference. I am using CCE Basic, without any of their filtering settings enabled. I am also using PowerDVD 5 to view my MPEG-2 files, with default settings. Media Player Classic is giving me an issue when trying to move through a video, so I am not using that right now. Media Player 9.0 has some noise filtering settings enabled in the video section, so even if I disable them, I am still worried it is not giving me the true picture.

known_03
15th October 2003, 13:47
digitalman I'm curious in what your settings for mipSmooth are?

I have converted a 3 hour movie and have notice artifacts in the face and background. I was hoping that mipSmooth could help limit these problems?

Anyway thanks for any help you can give me.

digitalman
16th October 2003, 12:23
I just use Mipsmooth(preset="MovieHq"). You may try Mipsmooth(preset="MovieLQ")for older movie DVDs or independent films(which to me, always seem grainier than big budget movies).

Chainmax
16th October 2003, 16:42
sh0dan, could you upload the "two downsizers, one upsizer" version here?

sh0dan
16th October 2003, 18:43
If you are interested in a new suggestion you can try out:

SuperSubSample MipSmooth (http://cultact-server.novi.dk/kpo/avisynth/mipsmooth_updowntest.zip).

This version creates two mips using scalefactor, and one mip using 1/scalefactor instead of a third mip. This will create a mip at the inverse factor.

Very experimental - very untested.

known_03
17th October 2003, 03:08
I used the suggestion from digitalman -- undot(), then mipsmooth (moviehq) and results where very impressive indeed on a 3 hour movie (3000 ish) bitrate.

The arifacts that I was getting in the movie have smoothed to the point that they are not noticeable specially in in close ups of peoples faces and slow motion in the background.

Great job sh0dan!

Boulder
17th October 2003, 07:55
Looking very good, sh0dan:) I'm currently waiting for a capture with lots of rainbows so I can test how MipSmooth can get rid of them.

Does the filter work properly with interlaced material or do I have to do the SelectEven()-SelectOdd()-Interleave trick?

Didée
17th October 2003, 08:35
Alas, I had no time for testing so far ("Fulltime Job" with Restore24), but I really look forward to test it out.

However, Sh0dan, two questions:

1. If a given pixel lies within the threshold in more than one mip, how do you decide from which mip to take the destination pixel? Or do you, in this case, average the destination from the according mips?

2. Spontaneous idea:
In case of working with a scalefactor>1, it could be worthful to additionally involve XSharpen. (Inspired by mf's SharpTools, and its brilliant results.)
I.e. instead of creating three mips

[source] * [scalefactor] * [scalefactor] * [scalefactor],

create

[source] * [scalefactor^3].XSharpen(0~255,255) / [scalefactor] / [scalefactor]

Of course, this would need quite some CPU cycles more. But I could imagine that this way even more smoothing through higher thresholds can be achieved, without smoothing away the sharpness - or perhaps even smoothing the noise while enhancing the definition.

What do you think?

- Didée

Chainmax
17th October 2003, 18:15
sh0dan: up factor = 1 / scalefactor doesn't reflect my suggestion.

For instance, if scalefactor was 0.6, then the two downsized "mipmaps" would be 60% and 36% of the original frame's size and the upsized "mipmap" would be ~167% of the original frame's size.
What I meant to suggest was that using a scalefactor of 0.6, the upsized "mipmap" should be 140% of the original frame's size, so as to be symmetrical (so to speak) with the first "mipmap" taking the original frame as reference point. So, according to my suggestion:

Up Factor = 2 - Scalefactor

Zarxrax
17th October 2003, 19:50
I think something funky is happening with this for me. I tried out the anime presets and they both were very destructive to the image and also increased filesize quite a bit.
Here's the original:
http://www4.ncsu.edu/~baclontz/mip-orig.png
And here's with AnimeHQ preset:
http://www4.ncsu.edu/~baclontz/mip-smooth.png

Is something wrong here?

Yuri
17th October 2003, 23:02
Personally, I'm not quite happy with the quality of the filter working on VHS natural images - even with "moviehq", and "movielq" prms - the fine details were gone, however, the compressability got better. When I tried "vhs" prm the result was just awful! One very oversharped interlaced DVD cartoon of mine was fixed, though, with the with "moviehq" preset, the picture suffered with the "anim" presets.
So, I am still a confirmed faery/pixiedust-user, that's a great one but verrrry slow (btw, the mipsmooth is not a fast-runner, either). PixieDust preserves every tiny little bit of detail (you know, they are a rare thing in VHS captures, and to lose them is not such a bright idea). PixieDust gives no smoothing at all but eliminates dot crawling, rainbows and all the rubbish. MipSmooth is a good filter of course but definitely one-purposed which requires much tweaking.
Anyway this is my personal opinion.
Thanx
p/s
I started a new threat instead of reply, SORRY.

Shayne
17th October 2003, 23:57
Originally posted by sh0dan
Hi folks!

a good replacement for smartsmooth, C3D and a supplement to VagueDenoiser.


Yuri you should read what the man said. But of course you r weclome to your opinion

Chainmax
18th October 2003, 19:59
You know, Yuri actually brings up a question that I've been making myself lately. Since I read a lot of threads where people use smoothers to denoise and/or denoisers to smooth, I'd like to know exactly what is a smoother and what is a denoiser. A link with actual technical explanations would be very appreciated.

Anyway, can someone make a side-by-side comparison of MipSmooth standard and MipSmooth with two downsizers and one upsizer?

vidiot
18th October 2003, 20:02
Thanks for tihis filter Shodan,

after some tests on "tvcaptured-anime" th efilter could replace my "fluxsmooth-C3D Combo". Speed stays the about same - depending on the settings.
My example:
MipSmooth(preset = "AnimeHQ", scenechange = 8)
vs.
FluxSmooth(5,10)
Convolution3d (preset="animeHQ") (Yes - good tvcapture...)

booth stay around 9 to 10 fps but with MS varies more.

vidiot

jkwarras
18th October 2003, 20:19
I've just tested this filter with a 2CD XviD DVDrip trying to reencode it to 1CD. Tryed wit Movie HQ and MovieLQ and the results are very bad. No other filter except Undot() (before the filter) was applied. The image is completly blurried and look awful :(

Yuri
18th October 2003, 21:31
I'm sorry, if I expressed my thoughts wrong.
Well, my starting idea was to have a decent SMOOTHER after/before a DENOISER for the compressability purposes ONLY. The denoiser eliminates all kinds of noise, and a smoother should preserve the details as much as possible BUT give a better compressability. I have been and will use my favourite denoiser PixieDust. I was trying to find a good smoother which would satisfy the above requirements. I tried out DCT, C3D, smootherHiQ, mipsmooth-the-old-version, undot, and unfilter. I liked undot and unfilter very much - very gentle blurring and good compressability. Mipsmooth-the-new-version was not a success with me - that all, but it means absolutely nothing, 'cos there will be someone who will gain much from it.
Good luck.

mikeson
18th October 2003, 21:35
@jkwarras:

Please post detailed information about your AviSynth script and XviD settings. Reporting bug like this is absolutely useless.

BTW what is the point in reencoding video already in XviD? You won't get any good results doing this.

jkwarras
19th October 2003, 02:32
Originally posted by mikeson
@jkwarras:

Please post detailed information about your AviSynth script and XviD settings. Reporting bug like this is absolutely useless.

BTW what is the point in reencoding video already in XviD? You won't get any good results doing this.

Sorry about that. I used XviD Koepi 24/06/2003. MPEG, 6 ultra-high, VHQ 1, lumimasking, chroma motion, GMC, 3 bframes, bframe quant 150, bframe offset 100, bframe threshold 0,chroma optimizer, max min I and P frame 2-31. 1 pass quality based at 95%. Avisytnh script was only used to aply the filter, only undot() was used and before the filter.

I reencode 2Cd just to fit it into an XCD. I do not expect it to be better quality than a 2CD rip, i just want to fit it in 1.

mikeson
19th October 2003, 09:23
@jkwarras:

Please do not use lumimasking ATM, it doesn't do any good. GMC is not so effective right now also. For B-frames it is better (at least for me) 2/150/75/0 (that is default IMHO) And instead of 1 pass quality based, use regular 2 pass. Please read this (http://forum.doom9.org/showthread.php?s=&threadid=56709&highlight=snowbeach+guide), this (http://forum.doom9.org/showthread.php?s=&threadid=53136) and this (http://forum.doom9.org/showthread.php?s=&threadid=16935) if you haven't already.

And if you are testing AviSynth filter, it would be wise to encode into lossless (for testing only), so you will see if undesired effect is caused by AviSynth filter or codec.

jkwarras
19th October 2003, 11:54
@mikeson:

The loss in image quality is not caused by my encoding settings, you can already see the effect in the virtualbudmod window, image is oversmoothed in most parts of the image (washed effect) and edges are preserved which is a awful effect. I was using "MovieHQ" or "MovieLQ". Using avisynth 2.5.2 11 october 2003.

I'm not blaming the filter, i hope i can replace my Convolution3d/Fluxsmooth combo, i post it becasue it can help developers.

BTW i've just finish an 1 pass quality based with Convolution3d ("MovieLQ") and it looks very good. So it's really not my settings.

Boulder
19th October 2003, 11:57
You don't have to use the presets. Lower the thresholds manually to taste.

sh0dan
19th October 2003, 23:26
@jkwarras: Yes - try lowering thresholds, as Boulder suggests, and post your preferences here. Also try setting scalefactor to values closer to 1 (try something like 0.80 and 0.85).

I've found that AnimeLQ is too agressive, and tit should probably be adjusted.

cipher
20th October 2003, 00:29
I've found that AnimeLQ is too agressive

Agreed.

jarthel
20th October 2003, 06:43
Any results for rainbow removal?

what's the avg speed? please post script.

Thanks

jayel

archimage
20th October 2003, 07:26
:confused:
Doggone , peeps are really positive in this thread , i mean " tell us how you really feel ;) " j/k :devil:
I have a hauppauge pvr , which has a kfir hardware mpeg encoder an records directly to mpeg2(yv12) . I allways record at 12MBit/sec FullD1 VBR throttle set at 18.78 MBits/sec through s-video input on my Dtv receiver . Quality is usually good , but on Mtv ,VH1 etc... music videos , i get bad de-interlacing artifacts , jaggies , i also get rainbowing artifacts when camera pans in front of a metal fence , or pans in front of a reflective surface " hood of a car , windows " . I mostly use Convolution3D(1,12,12,8,8,2.8,0) for high motion videos , which helps filter out left over interlacing artifacts with out over smoothing , but it could still be improved . It doesnt do much for chroma distortion , but i dont think those were the intentions of the :devil: , so its illrelivent .

MipSmooth is a good replacement for Convolution3D ,for me , on high motion videos , an Live events (Football games etc..) . MipSmooth(preset = "MovieLQ") removed high-motion de-interlaceing artifacts alot better than C3D , from my perception . I also tested LOTR Two Towers . In the begining of the movie , where it pans in from the sun to the mountains , MipSmooth(preset = "MovieHQ") deffinately took away too much back ground detail , but it looked great when gandolf was falling into hell with the :devil: . C3D with the above settings , an lower 0,4,4,8,8,2.8,0 , is alot better with back ground depth , I mostly use C3D as a de-noiser for detailed material (dvds etc..) an its always been pretty good to me ;) thnx vlad . I would have to do alot more testing before i could say if it could be a total replacement for C3D , but keep up the good work sh0dan , i respect all of work . I dont post much but have been around browsing Doom9 since Oct 2001 , an i appreciate all you have done to help out the video community "Hobby" .

Rainbows:

LoadPlugin("x:\MPEG2Dec3.dll")
mpeg2source("x:\korn.d2v",cpu=2,iPP=true)
LoadPlugin("x:\decomb410b2.dll")
LoadPlugin("x:\MipSmooth.dll")
Telecide(agg=True,post=true,chroma=true,guide=1)
MipSmooth(preset = "Rainbow")

I tested on rainbow artifacts , with the above script , an it could still use some work . I would like to attach a rar , with two .bmp pics , with the rainbow artifact filtered with preset above and source pic with artifact , but i dont see a way to upload anything , so ill hold off on that for a little bit . I can also supply a few source frames of the chroma artifacts , if any one is interested .


@jkwarras

I know your trying to help an all , but you should try to use lossless codecs when testing the true effect of a filter on your source , so there can be no room for doubt . Secondly , Xvid 1 pass qaulity doesnt = 2 pass 1cd rip , from my Perception , All 1cd rips look like crap ,rv9,Xvid,Divx,WM9 , but thats just my opinion :) . Thats the problem when using lossy codecs , when testing filters , too many variables .

jkwarras
20th October 2003, 13:39
Originally posted by sh0dan
@jkwarras: Yes - try lowering thresholds, as Boulder suggests, and post your preferences here. Also try setting scalefactor to values closer to 1 (try something like 0.80 and 0.85).


I used presets because i though this was somehow "tested" and were similars to convolution3d. I'll try your suggestions and post some results :)

acrespo
23rd October 2003, 02:19
I don't understand this line of MipSmooth manual:

"When cropping right before this filter, use "align=true" parameter, available in AviSynth 2.5.3 and later. This will in most cases give a slight speedup."

align is a MipSmooth or AviSynth parameter? If AviSynth, where I put this parameter?

KpeX
23rd October 2003, 02:25
Align is a parameter of crop, i.e. Crop(left, top, -right, -bottom,align=true)

acrespo
23rd October 2003, 23:52
Tanks KpeX.

What does it do?

The Crop filter is needed imediately before MipSmooth for put align=true or anywhere before MipSmooth?

sh0dan
24th October 2003, 09:13
It realigns the frame in memory for faster access for the following filters - there is however no guarrantee that it will be faster. So if you by chance should have a crop right before mipsmooth if might be slightly faster if you use align=true. Otherwise don't worry too much about it.

crusty
26th October 2003, 18:28
I would just like to add that there is no mention of this 'align' value at all in the avisynth manual at avisynth.org.

Perhaps an update? :D

Wilbert
26th October 2003, 19:45
I forgot to ask Sh0dan about this option (before adding it).

It realigns the frame in memory for faster access for the following filters (...)
I still have no idea what this means :confused:

sh0dan
27th October 2003, 09:58
[Warning: Do not read, if you don't care about technicalities, just skip to the conclusion]

ok - here goes - when an image is cropped it actually isn't touched at all. When you consider the frame in memory, you will always be able to do the crop by adjusting the image properties.

new_image_offset = old_image + crop_top * pitch
new_image_offset += crop_left * bytes_per_pixel.

Re-adjusting width and height will make the image have the proper dimensions. So in effect images are newer touched when they are cropped.

Modern processors like data to be nicely aligned when accessing it. When reading 4 bytes (an int), it is faster when the read is aligned to a mod4 placement in memory. MMX/SSE likes 8-byte alignment and SSE2 likes 16-byte alignment. If the data is NOT aligned, each read/write operation will be delayed at least 4 cycles. So images are always aligned to mod16 when they are created by AviSynth.

If an image has been cropped, they will sometimes be placed unaligned in memory - "align = true" will copy the entire frame from the unaligned memory placement to an aligned one. So if the penalty of the following filter is larger than the penalty of a complete image copy, using "align=true" will be faster.

... and - as this is fairly theoretical, and the potential gain is quite small - just don't use it, unless you are willing to benchmark to see if it is faster.

Wilbert
27th October 2003, 20:33
Feel free to move it to the dev. section if necessary.

I was reading http://www.avisynth.org/index.php?page=WorkingWithImages a bit. Sorry for asking some dumb questions:


ok - here goes - when an image is cropped it actually isn't touched at all. When you consider the frame in memory, you will always be able to do the crop by adjusting the image properties.
I guess this is a translation of: the pitch doesn't change, but width/height of your image does?

If an image has been cropped, they will sometimes be placed unaligned in memory
When does this happen? Cropping an YUY2/RGB32 image is always mod4. I guess this is the consequence of applying other filters?

Mug Funky
28th October 2003, 15:21
firstly, thanks for the development sh0dan... i'd send money but i don't have enough :)

one thing with mipsmooth: would it be possible to specify the a and b values for the bicubicresizer, or are they the defaults? i'd think it'd be good to be able to downsize with bilinear, and upsize with bicubic(1,0) so you get a nice blur going. i already use something similar to get a soft-focus effect.

sh0dan
28th October 2003, 15:42
@Mug: Yes it is default values. Why not just use bilinear both ways?

Soft Bicubic ~= Bilinear
Sharp Bicubic ~= Lanczos

(~= means approximately equal to)

In my experience the resizer is not that important - thresholds, method and scalefactor has larger influence on the result. I've for that adjusting scalefactor is quite important for high quality material.

@wilbert: It happends often in YV12, and MMX is hit by non-mod8 YUY2 and RGB(32). It should also be noted, that the image isn't touched, if it is aligned (to mod16).

tehpwner2
29th March 2006, 13:59
All your links to filters are dead links!

mikeson
29th March 2006, 14:07
@tehpwner2: Three years, what would you expect? :)

tehpwner2
29th March 2006, 14:30
Just realised lololz!

Wilbert
29th March 2006, 14:41
New link: http://forum.doom9.org/showthread.php?t=64940

I have closed this thread.