View Full Version : Focus2 : Blur2/Sharpen2
Marc FD
3rd September 2002, 09:20
MMX optimised. (4x faster on my config)
enjoy :cool:
(dl on my site)
Guest
3rd September 2002, 14:03
Blur2(1.5) throws an exception about invalid parameters.
So does Blur2().
You say you use the same parameters as Blur().
What is the problem, please?
Marc FD
3rd September 2002, 16:40
you should use Blur2(clip,Vthresh,Htresh).
(because i was interessed by the V/H blur, it seems i broken something) sorry.i'll fix it.
Guest
3rd September 2002, 17:16
Please ship current documentation with your filters and save everybody some grief. These little touches are what determine the usability of your tools. You do want people to use them, don't you? :)
OK, so what are the Vthresh and Hthresh? How do I set the blur strength?
Thank you.
Marc FD
3rd September 2002, 17:31
i'm going to work on it right now.
it's why it's a beta : it works but i didn't see details like this.
next version would be 100% compatible with avisynth Blur/Sharpen.
can you please test Blur2(clip,1.0,1.0)
i would like to know if it's only an interface bug.
thx.
Guest
3rd September 2002, 17:40
Marc, why won't you answer my questions? :)
How can I say if it "works" if I don't know what it is supposed to do?
Here I repeat my questions:
OK, so what are the Vthresh and Hthresh? How do I set the blur strength?
Thanks, Marc, for your patience.
Marc FD
3rd September 2002, 17:56
it's EXACTLY the same as avisynth's blur/sharpen :
arglist : cf[]f
AmountH = args[1].AsInt(0);
AmountV = args[1].AsInt(AmountH);
I added examples in my readme. in fact i had just not added [] before f.
and sharpen is still buggy :rolleyes: ... going to update it. wait 3 min.
EDIT : no pb, i updated sharpen unconsiusly too :D
EDIT2 : Blur() will not work. (but i don't think it's a problem, is it?)
sh0dan
4th September 2002, 09:09
Marc, your great efford is very much appreciated, but much of your work gets wasted because you don't take the time to document and test your filters, and give us an idea of how it works.
Documentation is cruzial for us to test your filters, since I don't have the time for trial-and-error. I've given up on using CopySame, MAM, blur2 and using CNR2 productionwise, because I simply can't easily find out how they work, and how to adjust for certain situations. Also I've had enough strange exceptions and problems to trust them.
Having beta versions is an ok thing, but if you don't keep your site updated with known bugs (MAM for example), I simply can't trust them enough to use them.
Again, your efford is a great thing for the community, but please spend a little for time on documenting and testing your filters - that's what makes the difference between ok filters and GREAT filters. Donald is my personal hero in this sense. Even though he has released several filters lately for testing, they have always been tested before they are released, and there has been good documentation.
We all experience a bug slip through, but basic testing in different setups is a very good thing.
Hope you can use this for getting your filters out more widely.
Marc FD
4th September 2002, 13:25
you know, i really test and re-test it !
this filter (Focus2) was finished 2 weeks ago, and i tested it a lot.
MAM is in early beta stage...
CopySame is not very easy to use, but i really putted many efforts in documentation.
i always use Cnr2() , and did never tweaked it much, because i always get ghosting. if someone test it, he would now the impacts of the settings better than me.
i know documentation is my weak.
but i'm french and it's not always easy to say exaclty what i want.
I promise i would put more efforts in my docs now :D
PS : feeback on Blur2/Sharpen2, anyone ??
Guest
4th September 2002, 14:39
Your documents still are horrible. You say the syntax is the same as blur() and sharpen(), but you've added a parameter. Your readme does not describe the parameters. You give an example with only one parameter that does not work.
Finally, sharpen2(1.5,1.5) throws an exception and does not work. But Blur2(1.5,1.5) works. You need to document limitations like this.
hakko504
4th September 2002, 14:57
@Marc
If you have a problem with writing good english, why don't you make the initial readme's in french? I'm sure there must be some people who understands french well enough to make some initial test who then could post results and findings here, and then you could use that to create an english readme. You might even find someone willing to translate the readme's for you. (Don't look at me, my french stinks :rolleyes: )
Marc FD
4th September 2002, 16:25
Originally posted by neuron2
Your documents still are horrible. You say the syntax is the same as blur() and sharpen(), but you've added a parameter. Your readme does not describe the parameters. You give an example with only one parameter that does not work.
Finally, sharpen2(1.5,1.5) throws an exception and does not work. But Blur2(1.5,1.5) works. You need to document limitations like this.
Argh :( !!!! it's not a feature, it's a BUG :( !!!!
the problem is, because Sharpen and Blur are mirrors (in the code point of view) i always test functionnality on Blur :
Blur(1.0) gives Blur(1.0,1.0) in avisynth,
Sharpen(1.0) gives Blur(-1.0,-1.0) in avisynth,
ect...
it's because i used animate and i've done serial tests.
i admit i didn't checked the syntax at all : i was working on the code :rolleyes:
but the code works, and that's important !!
i'm going to check this problem, sorry for everything :(
@hakko
it's an idea, but i think i'm not that bad ;)
the thing is just i need more time to write documentation....
.. and sometimes i don't say things because i feel it's logical ( i know it's dumb )
i'll try to do better next time :)
Marc FD
4th September 2002, 17:19
i just cheched the .dll you can dl on my site :
Sharpen2(1.0) works
Sharpen2(-1.5) works
Blur2(1.5) works
Blur2(-1.0) works
you can't use Sharpen2(1.5) nor Sharpen(1.5). (like you writed)
I've just taken a look on avisynth doc, and i've seen there is a lack of information about a feature of Blur() and Sharpen() from avisynth.
Because i never use the doc (i prefer read the source code, i do it faster) , i didn't see it was not mentionned.
Updated : (from blur.html in the doc)
Blur(clip,amount)
or Blur(clip,amountH,amountV)
Sharpen(clip,amount)
or Sharpen(clip,amountH,amountV)
These are simple 3x3-kernel blurring and sharpening filters. The
largest allowable argument for Blur is about 1.58, which corresponds to
an even 3x3-pixel blur. A value of 1.0 gets you a (1/4,1/2,1/4) kernel.
If you want a large-radius Gaussian blur, I recommend chaining several
copies of Blur(1.0) together. (Anybody remember Pascal's triangle?)
Negative arguments to Blur actually sharpen the image, and in fact
sharpen n is just an alias for Blur -n. The smallest allowable argument
to Blur is -1.0, and the largest to Sharpen is 1.0.
You can use 2 arguments to set independent Vertical and Horizontal
amounts. Like this, you can use Blur(0,1) to filter only Vertically,
for example to blend interlaced lines together.
i will update the wikki too.
EDIT : Wikki Updated
I didn't added it at all !!! it WAS in avisynth. and i founded it very usefull. it's why i prefer avisynth's blur as the one in VDub.
Guest
4th September 2002, 23:03
Wonderful! Put that in your readme with the 2's added and you're done. I will now test properly against the native Avisynth filters. Thank you for the clarification, Marc.
ACClarke
5th September 2002, 10:52
I didn't use sharpen function before because it was too slow....
But your version is faster and for anime (bad manga for example) it's really great !
merci !
sh0dan
6th September 2002, 08:40
If you put up the source, we could implement them as alternative paths in AviSynth, replacing the original Blur() functions!
IMO there is no reason having the original, if these routines completely dupe the existing.
Marc FD
6th September 2002, 15:52
Of course.
i coded it to integrate it in avisynth after.
but i would like a week or two beta-testing.
I think we should only use very stable filters in avisynth :)
(BTW, your normalize filter don't work for me :(,
and a little MMX code could help to find the max volume in the entire audio wave faster)
sh0dan
8th September 2002, 15:42
Just test away :) It's a rarely used filter, and it seems quite easy to test, so integrating it into the CVS shouldn't be so big a problem.
Could you describe the normalize problem better? It will be very slow delivering the first samples, and the computer may seem to stall, but that's how it has to work, unless you do sound compression (which will give you a very different result).
All I can say is that it works fine here - and regarding the mmx-code, feel free - I'm just pretty sure you won't gain anything more than max 1%, since all of the time is spend elsewhere on decoding and delivering the samples - the actual code is a very small part of that process.
Marc FD
8th September 2002, 19:05
Normalize gived me an acces violation. :(
i tested it only one time, so it could be an user issue.
when i speaked of MMX, it was only for the loading of the samples.
it takes too much time. maybe MMXing would help.what do you think.
BTW, when do you add floting-point samples in avisynth ??
I heard there would be YUV12 in next version of avisynth too.
How exactly would it be done ?
I'd really like deinterleaved (or 128 bit interleaved) YUV data.
Marc FD
9th September 2002, 15:16
I think nobody really tested this filter.
so i did some beta-testing myself and founded a bug.
will release a new fixed version soon.
gamr
10th September 2002, 07:58
good ***** dude, i have a pretty extreme filtering setup and i was using blur, changing to blur2 got me another fps which is a big help when i was only at 4fps before :D i threw everything i had at it and i cant find any bugs.
keep up the good filters
gamr
10th September 2002, 12:21
beta1 = good
beta2 = bad
preview in vd, then cancel the preview and goto seek in the video and it doesnt work, 'downgrade' to beta1 and its all good again, what debug info do you want? hehe
*edit* put this on hold, blur2 from beta1 now wont work either, lemme see whats up with this before you go bug hunting :confused:
Marc FD
10th September 2002, 16:21
? strange.
I really maked a very serious check for beta 2.
i hope i didn't broken something when i cleaned the code :(
could you please try Blur2 alone ?
and try mod8 / non mod8 horizontal sizes too.
thx.
PS : I want this filter to be _very_ stable before integrating it in avisynth.
EDIT : I tested it in all configurations (various sizes, YUY2/RGB32/RGB24, AVIsource, MPEG2source, ect...) before i released it. Please gimme all the info i need to track this bug down.
Guest
11th September 2002, 13:07
Blur2() is crashing all over the place for me. :(
Marc FD
11th September 2002, 13:25
i assume you use beta 2.
damn, how do you all get tons of bug with my filters :( :confused:
can you please say me more (script, ect...)
i think you have an "acces violation". right ?
I'm going to recheck again the code, i don't want everybody to think i'm lazy to kill bugs :devil:
Nic
11th September 2002, 13:38
Hmm, thought Id try to help track down the bug, but blur2 crashes all the time (?) Im surprised you hadn't come across it Marc....
Just did AVISource(..) with Blur2(0.5)...
Good luck,
-Nic
Marc FD
11th September 2002, 13:44
I think the problem is the _rare_ "i've broken eveything just before my last release build" problem. this is very strange, because i putted many efforts on debuging. the next would be the last :) (i hope...)
Marc FD
11th September 2002, 15:11
yep.
i've introduced a typo when i've made GPL conversion.
the better is : it was still working !!!
until i test with a Resampling function....
Please say me if it's finally bugfree now.
Guest
11th September 2002, 16:32
>Please say me if it's finally bugfree now.
What does "it" refer to? There is no attachment. And since you've left the buggy CopySame() on your website, I'd be surprised to find you'd updated Focus2() there. :)
So, where are we to find the new version? Thank you.
Marc FD
11th September 2002, 16:40
it's beta 3 on my site.
(where did you found the beta 2 ???)
And i've added CopySame v1.2 on my site too.
Guest
12th September 2002, 02:57
So far, so good on beta 3.
One thing I've noticed about this blur as well as the integrated blur. Make an avs with 250 instances in a row with strength 1.58. You'd think it would be pretty blurry. It's not. After a while (about 10 instances, they stop having any additional effect). Any idea why?
Marc FD
12th September 2002, 16:09
Strange...
maybe an avisynth limitation ??
i don't remember i had see that...
i can check here if you want.
BTW : It works ?? really !? :D
sh0dan
15th September 2002, 15:50
No - it is probably a filter problem. Have you cheked your loops (insert 'int 3' into your assember and run vdub in Debug mode from VC6 - then you will get an assertion when it hits the 'int 3' command.
BTW, I looked through your source, and your assember seems very weel written - now get this bug squashed and do some compares, so we can implement this :)
Marc FD
15th September 2002, 16:12
No it's not a filter restriction.
Or maybe the filter effect is not noticeable after many iterations ?
i've made tests between Blur2/Sharpen2 a long time ago and the only difference i could see was in the precision of the setting.
There are less different settings avaible (because amount is coded on 6-7 bytes instead of 16 bytes)
If you use the same setting, the 2 gives the same output
And the 4 first pixels and the 4 last in a row are not H-filtered
i need to fix that, then you couldn't see the difference between Blur/Sharpen-Blur2/Sharpen2 by eye.
i know the int 3 technique. i saw it in one of our MMX artworks :)
Bye.
Dark-Cracker
15th September 2002, 16:28
hi,
happy to see u have been unban from the doom9 forum :)
i hope frenchy are welcome in this forum.
ACClarke
15th September 2002, 16:31
Originally posted by Dark-Cracker
hi,
happy to see u have been unban from the doom9 forum :)
i hope frenchy are welcome in this forum.
frenchy yes but french language no :)
but it's hard to forget your mother tongue :D
Marc FD
15th September 2002, 16:37
i've never been banned.
i just withdraw for some weeks.
i make a french cure on http://forum.media-video.com/
everyone is welcome :)
tchao.
Marc FD
9th November 2002, 13:38
Hi ^^
if you use avisynth Blur/Sharpen in your encodes, you need focus2 ^_^
but how do you do it in YV12 ?
simple : use Focus2 YV12. (Focus2 beta4)
(dl on my site)
PS @Sh0dan : if it proves it's stable (should be, it is for me), i think it might be a good idea to integrate it in avisynth 2.5, no ?
sh0dan
10th November 2002, 17:34
Originally posted by Marc FD
PS @Sh0dan : if it proves it's stable (should be, it is for me), i think it might be a good idea to integrate it in avisynth 2.5, no ?
I was just going to ask you the same thing, when I saw the filter on your site! Great work, Marc!! I'll implement it when I get the time!
Marc FD
10th November 2002, 17:52
okay. no problem.
the only "error" is with the right & left borders. but the result is 99.99% the same as Blur/Sharpen C, it just appear when you iterate too much (20 times ^^)
i don't think it really worth the work of fixing it. (if it's possible ^^)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.