digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   SansGrip Filters: FluxSmooth (http://www.digitalfaq.com/archives/avisynth/1597-sansgrip-filters-fluxsmooth.html)

SansGrip 11-16-2002 10:13 PM

FluxSmooth
 
Here's a new spatio-temporal smoother I wrote today based on ideas that came to me developing NoMoSmooth.

The source code is available. Here's the description from the documentation:

Quote:

One of the fundamental properties of noise is that it's random. One of the fundamental properties of motion is that it's not. This is the premise behind FluxSmooth, which examines each pixel and compares it to the corresponding pixel in the previous and last frame. Smoothing occurs if both the previous frame's value and the next frame's value are greater, or if both are less, than the value in the current frame.

I like to call this a "fluctuating" pixel, then I like to wipe that pixel from existence by averaging it with its neighbours. This is (by default) done in a spatio-temporal manner, in that for each fluctuating pixel its 8 immediate spatial neighbours as well as its 2 temporal neighbours (the abovementioned corresponding pixel from the previous and next frames) are considered for inclusion in the average. If the value of each pixel is within the specified threshold, it is included. If not, it isn't.

This filter seems to remove almost all noise from low-noise sources (such as DVD) and a lot of noise from high-noise sources (such as cable TV captures), while maintaining a good amount of detail.

The speed at which it operates depends upon the amount of noise in the clip.
As usual your mileage may vary. This filter is unrelated to flux capacitors, which enable one to travel temporally.

Edit: Removed links to old version.

kwag 11-17-2002 01:01 AM

Hi SansGrip,

So this filter supercedes NoMoSmooth?

Thanks,
-kwag

kwag 11-17-2002 01:04 AM

Re: FluxSmooth
 
Quote:

Originally Posted by SansGrip
This filter is unrelated to flux capacitors, which enable one to travel temporally.

:lol: Remember, on the latest version, we don't need to accelerate to 88MPH :) :wink:

-kwag

kwag 11-17-2002 01:32 AM

FluxSmooth Sample
 
To keep up with the tradition ;) , here's a sample with FluxSmooth+Blockbuster:
http://mpeg.0catch.com/test6-flux-smooth-LBR.m1v
I use default parameters with the filter ( FluxSmooth() )
Sample encoded with the LBR template at CQ_VBR value of 27. Average bit rate is 610Kbps. It's 11 seconds, and file size is 932KB.

-kwag

jorel 11-17-2002 02:03 AM

help please,the links to download don't work SansGrip,help.

:cry: :cry: :cry:

kwag 11-17-2002 02:05 AM

Quote:

Originally Posted by jorel
help please,the links to download don't work SansGrip,help.

:cry: :cry: :cry:

I posted a link for you in your previous post.

-kwag

SansGrip 11-17-2002 10:59 AM

Quote:

Originally Posted by kwag
So this filter supercedes NoMoSmooth?

Nope. NoMo is motion adaptive, Flux isn't.

In other words, with NoMo you can use very strong spatial smoothing on areas of motion to improve compressibility (though you will very occasionally notice some artifacts if you look carefully). Flux is just a "noise remover".

Flux should be a lot more gentle than NoMo if maintaining detail is a priority.

SansGrip 11-17-2002 10:59 AM

Re: FluxSmooth
 
Quote:

Originally Posted by kwag
Remember, on the latest version, we don't need to accelerate to 88MPH :)

I think NoMo could do with some acceleration... :D

SansGrip 11-17-2002 11:00 AM

Quote:

Originally Posted by jorel
help please,the links to download don't work SansGrip,help.

I've had several posts about this from Doom9 too. They all work fine for me. The server must've gone down for a while.

SansGrip 11-17-2002 01:21 PM

New version
 
Here's version 0.2 with a minor bugfix, some optimizations, and support for Avisynth 2.5/YV12. I also changed the defaults as I found them too high.

Edit: Removed links to old version.

SansGrip 11-17-2002 01:22 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by kwag
To keep up with the tradition ;) , here's a sample with FluxSmooth+Blockbuster

How do you find it compares to other tests, wrt both quality and file size?

kwag 11-17-2002 05:40 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
To keep up with the tradition ;) , here's a sample with FluxSmooth+Blockbuster

How do you find it compares to other tests, wrt both quality and file size?

I like the FluxSmooth+Blockbuster better than NoMoSmooth+Blockbuster.
The file size difference is almost none. In a 1 minute, 30 second file prediction test, the difference is 16KB larger on the NoMoSmooth+Blockbuster. And that's negligible. However, I can see a MUCH better artifact reduction with the FluxSmooth+Blockbuster.
Here's a sample of what the complete 120 minute movie looks like on one CD-R. I encoded it last night with FluxSmooth+Blockbuster: http://mpeg.0catch.com/test7-fluxsmooth-blockbuster.m1v

-kwag

edmund 11-17-2002 06:37 PM

hey kwag what does your script look like??

kwag 11-17-2002 06:54 PM

Quote:

Originally Posted by edmund
hey kwag what does your script look like??

Like this ( the one I'm using on the LBR ) :

FluxSmooth()

######## Auto Strength, proportional strength depending on resolution #####
## Remove only one "#" on front of the resolution that matches your encoding.

BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480

BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, lv=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.

# The last ~10% is left untouched (pass-through), to avoid sharpening highest frequency components ( Peak artifacts, sharpest edge, etc. )
##
################## End Auto Strength ####################



-kwag

SansGrip 11-17-2002 07:14 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by kwag
However, I can see a MUCH better artifact reduction with the FluxSmooth+Blockbuster.

That's interesting. What settings? The defaults for 0.1 were quite strong. How do you find Flux wrt speed?

Quote:

Originally Posted by kwag
Here's a sample of what the complete 120 minute movie looks like on one CD-R. I encoded it last night with FluxSmooth+Blockbuster

That looks really good. I had no idea you could get such good results on a single disc...

kwag 11-17-2002 07:31 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
However, I can see a MUCH better artifact reduction with the FluxSmooth+Blockbuster.

That's interesting. What settings? The defaults for 0.1 were quite strong. How do you find Flux wrt speed?

I used the default. Just FluxSmooth()
But I didn't do any benchmarks 8O . Sorry!, I'm so amazed at the results, that I really don't care about encoding speed :) .
I'm encoding on a P4 @1.6Ghz, and at 352x240, it's about .9 real-time.

Quote:

Originally Posted by kwag
Here's a sample of what the complete 120 minute movie looks like on one CD-R. I encoded it last night with FluxSmooth+Blockbuster

Quote:

That looks really good. I had no idea you could get such good results on a single disc...
I have to encode "The Green Mile" ( 180 minutes ) with the LBR AND your filters :D
Last time I did, it looked good, considering it was encoded for one CD-R , but your filters were not around. That should be a good "stress" test to put your filters through :lol:
Also," Pearl Harbor" is also ~180 minutes, and was also encoded on one CD-R. I'll pull out my "Green Mile" tonight and run it again with your filters.
We'll see the results late late tonight or tomorrow ;)

-kwag

SansGrip 11-17-2002 07:46 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by kwag
I used the default. Just FluxSmooth()

Ok, well, when you do your next encode you might want to specify the old defaults as parameters then:

FluxSmooth(temporal_threshold=7, spatial_threshold=7)

Quote:

Originally Posted by kwag
I have to encode "The Green Mile" ( 180 minutes ) with the LBR AND your filters :D

hehehe I'm going to have to try an encode with LBR. I've not played with it yet.

kwag 11-17-2002 07:53 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
I used the default. Just FluxSmooth()

Ok, well, when you do your next encode you might want to specify the old defaults as parameters then:

FluxSmooth(temporal_threshold=7, spatial_threshold=7)

Will do. Just starting the rip now :D

Quote:

Originally Posted by kwag
I have to encode "The Green Mile" ( 180 minutes ) with the LBR AND your filters :D

Quote:

hehehe I'm going to have to try an encode with LBR. I've not played with it yet.
When you do, don't use the default CQ_VBR setting. Use the file prediction formula to adjust it, so that space and quality are optimized.
And let us know your results ;)

-kwag

jorel 11-17-2002 08:11 PM

@SansGrip

why don't you put the FluxSmooth-01.zip here,please?
i can't download it from your link! :(

SansGrip 11-17-2002 08:12 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by kwag
When you do, don't use the default CQ_VBR setting. Use the file prediction formula to adjust it, so that space and quality are optimized.

Ok, I'll do a search for that.

By the way, I just did a couple of test clips with the 528x480 template (the first of yours I've ever tried) with FluxSmooth and Blockbuster and it looks fantastic. I'm going to read up on the formula and do a two-disc of American Pie :).

By the way, I'm playing these on my Panasonic CV52 and the clips worked just fine. I've had bad luck with VBR movies in the past, though, with corruption problems around what I believe to be the middle of the disc. I'm thinking this might have something to do with the minimum bitrate... What do you think?


All times are GMT -5. The time now is 06:45 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.