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)

syk2c11 11-19-2002 09:18 AM

I am now switching from KVCDx3 to KDVD Full-D1 (New GOP, CQ_VBR, CQ=25, min=1000, max=4000), do I really need any filters, if so, which one (ones) suits the best (Blockbuster, Nomosmooth, Fluxsmooth)?

kwag 11-19-2002 09:22 AM

Quote:

Originally Posted by syk2c11
I am now switching from KVCDx3 to KDVD Full-D1 (New GOP, CQ_VBR, CQ=25, min=1000, max=4000), do I really need any filters, if so, which one (ones) suits the best (Blockbuster, Nomosmooth, Fluxsmooth)?

You'll still benefit from Blockbuster filter. This will help eliminate small DCT blocks on very dark and black areas.

-kwag

SansGrip 11-19-2002 10:21 AM

New version 0.3
 
Here's 0.3 (and the source).

Changes:

* Fixed bad bug that was messing up the algorithm.
* Because of above, put defaults back to 7, 7.
* Made numerous optimizations, should now be significantly faster.

Like I said above, I'm very excited about this one, but I need you guys to put it through its paces. I'm especially interested in figuring out the best thresholds for various sources (clean DVD, noisy DVD, captures, anime, etc.) and perhaps adding a "preset" parameter at some point.

Have fun :).

Edit: Removed links to old version.

VILLA21 11-19-2002 04:05 PM

Request for version number...
 
SansGrip:

Can you add to the code the version number of each .dll file?
Too many updates, somtimes i don"t remember which version currently i"m using... :)

SansGrip 11-19-2002 04:25 PM

Re: Request for version number...
 
Quote:

Originally Posted by VILLA21
Can you add to the code the version number of each .dll file?

Good idea. I'll do that for all future releases.

Quote:

Too many updates, somtimes i don"t remember which version currently i"m using... :)
hehehe well you can always look at the date of the file if you're not sure.

SansGrip 11-29-2002 11:44 AM

Update
 
Just to let you all know that I've not been idle over the past week or so, but have been attempting to reimplement Flux with multimedia extensions. It was hard going for a while, but then something seemed to click and this morning I fixed the last bug in the new iSSE version of Flux-for-YUY2 (I'm going to start the YV12 version this afternoon, and it should go quicker because I won't have to monkey around with pixel order like I do in the YUY2 version).

While the code is not optimized wrt pairing and stalls and all that good stuff, it still runs at twice the speed of the old C++ version on my system :D. I'm predicting the YV12 version will see an even bigger increase because of the lack of aforementioned monkeying around.

I'm hoping to finish it and release today, but I'm not promising anything. This is my first real C-to-MMX port and I'm still pretty slow at the moment.

markums2k 12-15-2002 08:45 PM

You guys are great!
 
Just yesterday I got the hang of FITCD. Blockbuster is working wonders for my video, and I can't wait to add Flux into the mix. I'm using Kwag's KDVD Half D1 template with all default settings. I'll let everyone know how the video turns out with these filters. I'm sure the results will exceed my expectations. :D

SansGrip 12-16-2002 02:16 PM

New version 0.4
 
I just released 0.4. Sorry about the delay -- darn real life ;).

The biggest change in this version is that I implemented ISSE-optimized algorithms for both the YUY2 and YV12 versions. From my quick benchmarks it seems to run about twice the speed of the C++ version. I also added chroma smoothing.

As usual you can get the latest version (and the source) from the web site in my sig. (By the way, I apologise for the downtime: the web server it's on is located in North Carolina, and they had a killer storm which took power down for days. It should be back up now.)

Many thanks to Doom9's trbarry, sh0dan, dividee, and everyone else who helped me figure out assembler and MMX by putting up with and patiently answering my stupid questions. Also many thanks to Kwag and all the other testers here on KVCD :).

kwag 12-16-2002 03:00 PM

Thanks SansGrip,

Glad to see you're back :D

-kwag

SansGrip 12-16-2002 03:10 PM

Quote:

Originally Posted by kwag
Glad to see you're back :D

Good to be back :).

It was kinda disturbing looking at the Flux source code again -- even after a couple of weeks I had to go through it line by line to figure out how it works 8O.

I'm hopefully going to spend some time on the Predictor next, but I'll write more about that in the appropriate thread.

Holomatrix 01-06-2003 10:22 AM

so would this be a good script?
BiLinear
Blockbuster .... the noise partor it
FluxSmooth

for both DVD and DVD anime?

Thanks

Boulder 01-06-2003 10:29 AM

Quote:

Originally Posted by Holomatrix
so would this be a good script?
BiLinear
Blockbuster .... the noise partor it
FluxSmooth

for both DVD and DVD anime?

Thanks

Change the order to

Bilinear
FluxSmooth
Blockbuster

or you'll be smoothing the noise you'll apply with Blockbuster.

Holomatrix 01-06-2003 10:59 AM

Ok, I'll try it. thanks, why do you put the add noise (blockbuster) at the end of the script?. So you guys think FluxSmooth is still better than Convolution3D?

GFR 01-06-2003 11:19 AM

Quote:

why do you put the add noise (blockbuster) at the end of the script?.
So that fluxsmooth doesn't filter out the blockbuster noise.

Holomatrix 01-06-2003 11:28 AM

so the added noise at the end is a good thing then? wierd. I was putting the noise before resize because of stuff like solid colour spots in video, like walls, is what the resizer is having problems with and not allocating bitrate properely hence the DCT blocks, so by adding noise at the begining then would make any varience in the 'wall' more prominant which intern gives the resizer a better 'view' of what's happening and alocates bitrate a little better. back to the drawing board :(

Boulder 01-08-2003 09:48 AM

It seems that FluxSmooth chokes on some video material. I'm trying to encode a DivX5 movie to KVCD at 352x576, but FluxSmooth chokes badly. It's a helluva lot slower than it should be, I'd say the prediction with FluxSmooth takes normally less than 5 minutes and with this video it takes more than 10! I've had this problem before and but I was able to get rid of it by moving FluxSmooth after resize. This time it was already after resizing so that's no good now (I did try moving it before resize without any luck). TemporalSmoother works OK.

SansGrip 01-08-2003 09:56 AM

Quote:

Originally Posted by Boulder
It seems that FluxSmooth chokes on some video material.

What CPU are you running on? In theory the processing speed of the C version will be inversely proportional to the amount of noise in the clip (i.e. more noise = slower). The ISSE-optimized version, however, should run at the same speed on all material.

Boulder 01-08-2003 09:58 AM

Quote:

Originally Posted by SansGrip
What CPU are you running on? In theory the processing speed of the C version will be inversely proportional to the amount of noise in the clip (i.e. more noise = slower). The ISSE-optimized version, however, should run at the same speed on all material.

Athlon XP, running somewhere around 1500MHz at the moment.

SansGrip 01-08-2003 12:36 PM

Quote:

Originally Posted by Boulder
Athlon XP, running somewhere around 1500MHz at the moment.

That's strange, then. Is this with YUY2 or YV12 input? What frame size is it processing?

Boulder 01-08-2003 12:44 PM

That's YUY2 input, I use Avisynth 2.07 currently. I'll try the same clip with AVS2.5a tomorrow and see if it's still the same result.

The frame size is 320x368. I don't think this is the issue as I've done numerous clips like this and have had only once or twice the same thing.

Here's the script I've tried if it's of any use:

LoadPlugin("c:\windows\system\fluxsmooth.dll")
LoadPlugin("c:\windows\system\convolution3d.dll")
LoadPlugin("c:\windows\system\dctfilter_yuy2.dll")
LoadPlugin("c:\windows\system\blockbuster.dll")
LoadPlugin("e:\progra~1\gabest\vobsub\textsub.vdf" )
LoadPlugin("c:\windows\system\legalclip.dll")
LoadPlugin("c:\windows\system\sampler.dll")
AVISource("c:\temp\leffat\evilde~1\ed2.avi",false)
Fadeout(250)
Crop(2,8,-2,-6)
LegalClip()
TextSub("c:\temp\leffat\evilde~1\ed2.srt",25)
BicubicResize(320,368)
FluxSmooth()
Blockbuster( method="dither", variance=0.7, seed=1 )
AddBorders(16,104,16,104)
DCTFilter(1,1,1,1,1,1,0.5,0)
LegalClip()
Sampler(length=24)

SansGrip 01-08-2003 01:24 PM

Quote:

Originally Posted by Boulder
I don't think this is the issue as I've done numerous clips like this and have had only once or twice the same thing.

Are you sure it's FluxSmooth causing it? What are the timings with and without Flux?

I'll look through the ISSE source and see if I can find what might be causing this...

Boulder 01-08-2003 03:18 PM

Quote:

Originally Posted by SansGrip
Are you sure it's FluxSmooth causing it? What are the timings with and without Flux?

99% positive it is FluxSmooth related. I've used it in my encodes a lot and it's been this slow only one or two times.

With Flux the sample strip (1944 frames) takes 6.49 min.
W/O Flux the sample strip takes 4.05 min.

A sample strip this long takes usually something like 5 minutes. I practically use the same script each time (the same filters) so I've got some experiences about that. However, it looks as if TMPGEnc gets stuck at one point somewhat longer than normally. This could be why the encoding seems slow.

Luckily this happens to be a very rare issue so please don't lose your night's sleep :wink:

SansGrip 01-08-2003 04:16 PM

Quote:

Originally Posted by Boulder
However, it looks as if TMPGEnc gets stuck at one point somewhat longer than normally. This could be why the encoding seems slow.

Could you try watching the whole thing in, say, WMP and see if it freezes up in the same spot?

Quote:

Luckily this happens to be a very rare issue so please don't lose your night's sleep :wink:
hehe ok I won't ;). Let me know if you come up with any more details.

SansGrip 01-08-2003 04:17 PM

New version 1.0
 
I just uploaded version 1.0 to my site, containing a bugfix and two minor Avisynth 2.5-related changes. I decided to bump the version number up to "stable" since this one's had a lot of testing now ;).

As usual, let me know if you find any problems.

Boulder 01-09-2003 02:19 AM

Quote:

Originally Posted by SansGrip
Could you try watching the whole thing in, say, WMP and see if it freezes up in the same spot?

That's it..I should have thought about that before. There is a small glitch in the video very close to the problem area. This is probably _the_ reason for the slowdown.

SansGrip 01-09-2003 07:42 AM

Quote:

Originally Posted by Boulder
This is probably _the_ reason for the slowdown.

But it plays through it okay in WMP? If so, it's a TMPGEnc problem. If not, it might be my problem :D.

Boulder 01-09-2003 10:02 AM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by Boulder
This is probably _the_ reason for the slowdown.

But it plays through it okay in WMP? If so, it's a TMPGEnc problem. If not, it might be my problem :D.

It does get past the point, there's just a little stuttering and some artifacts and then everything goes back to normal. I guess TMPGEnc just doesn't like that.

SansGrip 01-09-2003 10:41 AM

Quote:

Originally Posted by Boulder
It does get past the point, there's just a little stuttering and some artifacts and then everything goes back to normal. I guess TMPGEnc just doesn't like that.

That's great! Er, bad.

:mrgreen:

Boulder 01-09-2003 11:55 AM

There seems to be something wrong with the AVS2.5 version of the filter (the latest release). It gives an access violation error immediately whereas the AVS2.0x version works OK with the same clip.

I've tested with the latest AVS2.5 binary (updated today I think).

SansGrip 01-09-2003 01:07 PM

Quote:

Originally Posted by Boulder
There seems to be something wrong with the AVS2.5 version of the filter (the latest release). It gives an access violation error immediately whereas the AVS2.0x version works OK with the same clip.

Damn. Could you post the offending script?

Boulder 01-09-2003 02:04 PM

OK, here's the script:

LoadPlugin("c:\avs25\undot.dll")
LoadPlugin("c:\avs25\fluxsmooth-2.5.dll")
LoadPlugin("c:\avs25\blockbuster-2.5.dll")
LoadPlugin("c:\avs25\dctfilter.dll")
LoadPlugin("c:\avs25\sampler-2.5.dll")
AVISource("c:\temp\leffat\labyrinth\labyrinth.avi" )
Trim(575,139400)
SwapUV()
Crop(8,4,624,280)
Limiter()
UnDot()
BicubicResize(320,288)
FluxSmooth()
Blockbuster( method="noise", variance=0.7, seed=1 )
AddBorders(16,144,16,144)
DCTFilter(1,1,1,1,1,1,0.5,0)
Limiter()
#Sampler(length=24)

The AVS2.5 build is dated 9.1.2003, I believe you discussed about this release with sh0dan at the doom9 forum. The access violation occurs immediately when trying to seek in the file (using VDubMod).

SansGrip 01-09-2003 04:31 PM

Quote:

Originally Posted by Boulder
The AVS2.5 build is dated 9.1.2003

I can't duplicate this with the version of 2.5 I have (downloaded it yesterday). Let me try with the new version.

Edit: I can't duplicate it with the latest one, either. Can you try to whittle down the script to the bare minimum required to make it crash?

Boulder 01-10-2003 02:46 AM

It's somehow related to FluxSmooth as I commented out all the other filters and still the access violation occurred immediately when seeking. However, when I tried AVS2.5 dated 3.1.2003, there were no problems :evil:

The AVS2.0x script (with AVS2.07+) works fine, here it is:

LoadPlugin("c:\windows\system\fluxsmooth.dll")
LoadPlugin("c:\windows\system\blockbuster.dll")
LoadPlugin("c:\windows\system\dctfilter_yuy2.dll")
LoadPlugin("c:\windows\system\sampler.dll")
LoadPlugin("c:\windows\system\legalclip.dll")
AVISource("c:\temp\leffat\labyrinth\labyrinth.avi" )
Trim(575,139400)
Crop(8,4,624,280)
LegalClip()
BicubicResize(320,288)
FluxSmooth()
Blockbuster( method="noise", variance=0.7, seed=1 )
AddBorders(16,144,16,144)
DCTFilter(1,1,1,1,1,1,0.5,0)
LegalClip()
Sampler(length=24)

I also tried different clips but with no luck, the 2.5 version crashes but works with the AVS2.5 dated 3.1.2003.

Boulder 01-10-2003 02:59 AM

I did some more tests with the same clip (DivX content). I found out that this script crashes VDubMod:

Code:

LoadPlugin("c:\avs25\fluxsmooth-2.5.dll")
AVISource("c:\temp\leffat\labyrinth\labyrinth.avi")
FluxSmooth()

and this doesn't:

Code:

LoadPlugin("c:\avs25\fluxsmooth-2.5.dll")
AVISource("c:\temp\leffat\labyrinth\labyrinth.avi")
ConverttoYUY2()
FluxSmooth()

If ConverttoYUY2() is moved after FluxSmooth(), the crash occurs. What do you think of this, is it AVS or FluxSmooth?

bman 01-10-2003 04:52 AM

Quote:

Originally Posted by Boulder
That's YUY2 input, I use Avisynth 2.07 currently. I'll try the same clip with AVS2.5a tomorrow and see if it's still the same result.

The frame size is 320x368. I don't think this is the issue as I've done numerous clips like this and have had only once or twice the same thing.

Here's the script I've tried if it's of any use:

LoadPlugin("c:\windows\system\fluxsmooth.dll")
LoadPlugin("c:\windows\system\convolution3d.dll")
LoadPlugin("c:\windows\system\dctfilter_yuy2.dll")
LoadPlugin("c:\windows\system\blockbuster.dll")
LoadPlugin("e:\progra~1\gabest\vobsub\textsub.vdf" )
LoadPlugin("c:\windows\system\legalclip.dll")
LoadPlugin("c:\windows\system\sampler.dll")
AVISource("c:\temp\leffat\evilde~1\ed2.avi",false)
Fadeout(250)
Crop(2,8,-2,-6)
LegalClip()
TextSub("c:\temp\leffat\evilde~1\ed2.srt",25)
BicubicResize(320,368)
FluxSmooth()
Blockbuster( method="dither", variance=0.7, seed=1 )
AddBorders(16,104,16,104)
DCTFilter(1,1,1,1,1,1,0.5,0)
LegalClip()
Sampler(length=24)

Hi Boulder !

Where u get this TextSub.vdf file ?
Every time I downloaded zip I couldn't find TextSub.* file !
So I have to use VDub to get subs in video !!!

bman

Boulder 01-10-2003 05:24 AM

Quote:

Originally Posted by bman
Hi Boulder !

Where u get this TextSub.vdf file ?
Every time I downloaded zip I couldn't find TextSub.* file !
So I have to use VDub to get subs in video !!!

bman

Hi,

the file was/is in the VobSub package. You'll just have to select it while installing VobSub as it's not installed by default IIRC.

SansGrip 01-10-2003 06:53 AM

Quote:

Originally Posted by Boulder
If ConverttoYUY2() is moved after FluxSmooth(), the crash occurs. What do you think of this, is it AVS or FluxSmooth?

It's hard to say. Presumably if it is a bug in Flux it'll be in the YV12 code, but it's strange that it works fine with the few-days-older build. This might be another "combo" bug ;).

I think we should move this over to the Doom9 thread, and hopefully sh0dan will get involved again. At least he'll know what changed between the 3rd and the 9th...

Want to post a quick summary there, or shall I? :)

Boulder 01-10-2003 06:57 AM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by Boulder
If ConverttoYUY2() is moved after FluxSmooth(), the crash occurs. What do you think of this, is it AVS or FluxSmooth?

It's hard to say. Presumably if it is a bug in Flux it'll be in the YV12 code, but it's strange that it works fine with the few-days-older build. This might be another "combo" bug ;).

I think we should move this over to the Doom9 thread, and hopefully sh0dan will get involved again. At least he'll know what changed between the 3rd and the 9th...

Want to post a quick summary there, or shall I? :)

I think it's better if you post as you and sh0dan both know what you're talking about in the issue and will hopefully find the cause soon :)


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

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