Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th December 2008, 17:11   #61  |  Link
PeaceAnt
also known as GrassHoppeR
 
Join Date: Mar 2006
Location: Poland
Posts: 30
i fixed some problems, made a few optimalizations and improvements so it should work now (see code below).
please test it and give me feedback and/or any ideas for speed increase.

@Fizick,
thanks. i used aproximation method and it's faster but it decreases quality (see "trash" folder for that version of plugin).

Code:
		for (i=0; i < src_height; i++) {
			for (w=0; w<src_width; w+=4) {

			v = *(srcp + w + 3);
			a = (v & 15);
			b = (v & 240)>>2;
			b1 = max(w-b,0);
			b2 = min(w+b+4,src_width);

lb=lg=lr = 0;
for (j=b1; j<b2; j+=4){
lb+=*(srcp + j);
lg+=*(srcp + j+1);
lr+=*(srcp + j+2);
}
d=(b2-b1)*4+((b1!=0)?a:0)+((b2!=src_width)?a:0);   //(16 + v+v);
*(dstp+w  )=(lb*16+((a!=0)?a*(((b1!=0)?*(srcp+b1-4):0)+((b2!=src_width)?*(srcp+b2  ):0)):0)/d);
*(dstp+w+1)=(lg*16+((a!=0)?a*(((b1!=0)?*(srcp+b1-3):0)+((b2!=src_width)?*(srcp+b2+1):0)):0)/d);
*(dstp+w+2)=(lr*16+((a!=0)?a*(((b1!=0)?*(srcp+b1-2):0)+((b2!=src_width)?*(srcp+b2+2):0)):0)/d);
*(dstp + w+3) = v;
		}
pozdrawiam

http://members.lycos.co.uk/grasshopper/dof/dof_CHB1.jpg
http://members.lycos.co.uk/grasshopper/dof/dof_CHB2.jpg
PeaceAnt is offline   Reply With Quote
Old 5th December 2008, 18:07   #62  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
it was only hint, you may increase 16 to 20 and make some rounding fix
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 5th December 2008, 18:23   #63  |  Link
PeaceAnt
also known as GrassHoppeR
 
Join Date: Mar 2006
Location: Poland
Posts: 30
i did it already, no success
PeaceAnt is offline   Reply With Quote
Old 22nd March 2009, 23:43   #64  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,086
Guys! How do you load this variable plugin???? I tried LoadPlugin and i always get Unable to load.... error.
Atak_Snajpera is online now   Reply With Quote
Old 16th November 2009, 13:32   #65  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
Quote:
Originally Posted by Atak_Snajpera View Post
Guys! How do you load this variable plugin???? I tried LoadPlugin and i always get Unable to load.... error.
Same probleme here, the .dll won't load.
cretindesalpes is offline   Reply With Quote
Old 16th November 2009, 13:41   #66  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Which one are you talking about, my fixed version of the original or PeaceAnt's?
Guest is offline   Reply With Quote
Old 16th November 2009, 14:40   #67  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
Yours. But I solved my problem : it was likely a FFTW version issue. I updated fftw.h, regenerated the libfftw3*-3.lib, recompiled the plug-in and it now loads correctly.
cretindesalpes is offline   Reply With Quote
Old 19th February 2010, 02:40   #68  |  Link
Tuik
Registered User
 
Join Date: Apr 2009
Posts: 85
could you explain how to successfully load variableblur.dlll?? i have the version of the first post of this thread
Tuik is offline   Reply With Quote
Old 19th February 2010, 21:06   #69  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Do you have the fftw3.dll in your \system32 folder?
Do you have a 64bit Vista or Windows7? If so, fftw3.dll should be in the \SYSWOW64 folder.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 19th February 2010, 21:55   #70  |  Link
Tuik
Registered User
 
Join Date: Apr 2009
Posts: 85
Quote:
Originally Posted by Didée View Post
Do you have the fftw3.dll in your \system32 folder?
Do you have a 64bit Vista or Windows7? If so, fftw3.dll should be in the \SYSWOW64 folder.
I have Windows 7 64bit and there is no fftw3.dll neither in system32 nor SYSWOW64 folder. What should i do??

Many thanks
Tuik is offline   Reply With Quote
Old 19th February 2010, 22:22   #71  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Quote:
Originally Posted by Tuik View Post
What should i do??
1) Read 1st post of this thread

2) follow link

3) extract fftw3.dll into \syswow64
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 19th February 2010, 22:35   #72  |  Link
Tuik
Registered User
 
Join Date: Apr 2009
Posts: 85
Quote:
Originally Posted by Didée View Post
1) Read 1st post of this thread

2) follow link

3) extract fftw3.dll into \syswow64
I just did that and i still get the error. Also, i checked and i had fftw3.dll in Avisynth Plugins folder.

Thank you for the help once more.
Tuik is offline   Reply With Quote
Old 20th February 2010, 00:43   #73  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Then I'm out of ideas. I personally know what works on 32bit WinXP: have fftw3.dll in \system32, and have it *not* in Avisynth\plugins. Then I know *from hearsay* that on 64bit Windows, you've to put it in syswow64 instead of system32. In detail, I've only little clue about Avisynth on Vista, no clue at all about Avisynth on Windows7, and even less clue about Avisynth on 64bit OS'es.

Sorry i can't help any further. Perhaps somebody else knows something useful here.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 20th February 2010, 15:39   #74  |  Link
julius666
Registered User
 
julius666's Avatar
 
Join Date: May 2009
Location: Hungary
Posts: 77
Quote:
Originally Posted by Tuik View Post
I just did that and i still get the error. Also, i checked and i had fftw3.dll in Avisynth Plugins folder.

Thank you for the help once more.
try the system32, or system folder instead of SysWOW64. SysWOW64 is only for 64bit dll-s, as far as I know.
julius666 is offline   Reply With Quote
Old 20th February 2010, 16:20   #75  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,810
Quote:
Originally Posted by julius666 View Post
try the system32, or system folder instead of SysWOW64. SysWOW64 is only for 64bit dll-s, as far as I know.
No, it's the other way around - syswow64 is for 32-bit stuff.

David
wonkey_monkey is offline   Reply With Quote
Old 20th February 2010, 16:53   #76  |  Link
julius666
Registered User
 
julius666's Avatar
 
Join Date: May 2009
Location: Hungary
Posts: 77
Quote:
Originally Posted by davidhorman View Post
No, it's the other way around - syswow64 is for 32-bit stuff.

David
Oh I see. Anyway, it's worth to try the folder 'system', since I've put it there and it works to me.
julius666 is offline   Reply With Quote
Old 20th February 2010, 17:54   #77  |  Link
Tuik
Registered User
 
Join Date: Apr 2009
Posts: 85
I don't what i've done but now it works! Thanks a lot!
Tuik is offline   Reply With Quote
Old 21st February 2010, 08:00   #78  |  Link
Vitaliy Gorbatenko
viterra
 
Join Date: Feb 2003
Location: St. Peterburg, Russia
Posts: 142
No need copy fftw3.dll in \system32 dir!!!
copy it in plugins dir
and in in your avs file write:
SetWorkingDir("C:\[your path]\AviSynthPlugins\")
load plugin syntax will be:
import("Killer.avsi")
LoadPlugin("checkmate.dll")
and so on...
Vitaliy Gorbatenko is offline   Reply With Quote
Old 14th March 2011, 20:33   #79  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
I created a version of variableblur where gaussianblur can optionally undo gamma-correction before processing and then reapply it afterward. Specifically, gaussianblur and unsharp (which is just a special case of gaussianblur internally) have two new parameters:

Code:
     gfunc,gfuncc:  set the gamma function to use for Y and U/V planes. Default (-1,-1). Possible values:

          -1 = do not correct gamma (same processing as version 0.4) - Default
           0 = sRGB
           1 = BT.709, SMPTE 170M
           2 = SMPTE 240M
           3 = BT.470-2 System M   (straight 2.2 gamma, no linear segment)
           4 = BT.470-2 System B,G (straight 2.8 gamma, no linear segment)
           5 = (straight 2.22222 gamma, no linear segment)
           6 = (straight 1.8 gamma, no linear segment)
           7 = linear, no gamma compensation

         Gamma-correction will be undone (forward gamma transfer function) prior to filtering, and then reapplied (inverse gamma transfer function) after filtering.

     pcr/pcrc:  set the pixel value range for Y and U/V planes. Only used if gfunc or gfuncc >= 0. Default(0,0). Possible values:

           0 = [0,255]
           1 = [16,235]
           2 = [16,240]
Everything else is the same as before. I made my changes to neuron2's fixed 0.4 version. Maybe someone else will find it useful (probably in combination with showred/showgreen/showblue/mergergb).

Last edited by tritical; 14th March 2011 at 20:48.
tritical is offline   Reply With Quote
Old 19th March 2011, 19:02   #80  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
http://avisynth.org/mediawiki/External_filters#Blurrers
http://avisynth.org/mediawiki/Variableblur

One thing I haven't documented, is how this would work with MT. Does it need any mtmode? Where is the docs for mtmode?
jmac698 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.