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 6th May 2005, 00:39   #21  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
new version 0.3 . Now includes a "true" gaussian blur
tsp is offline   Reply With Quote
Old 8th May 2005, 14:33   #22  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
coolies. it looks pretty good, though the scaling (is that the right term) isn't what i'm used to.

for instance, gaussian blur of radius 16 is a huge blur in photoshop, but a modest one with your plugin.

of course, i can just use higher numbers

thanks heaps for the true gaussian blur. it's been a long time coming for the avisynth world, and works pretty good.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 8th May 2005, 22:05   #23  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally posted by Mug Funky
though the scaling (is that the right term) isn't what i'm used to
for instance, gaussian blur of radius 16 is a huge blur in photoshop, but a modest one with your plugin.
of course, i can just use higher numbers
x' = x^2

, if I'm not fully mistaken.
__________________
- 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 8th May 2005, 23:54   #24  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Quote:
Originally posted by Didée
x' = x^2

, if I'm not fully mistaken.
if the radius in photoshop is the standard deviation (sd) then it is correct. The reason I use variance instead of sd is because else the radius in binomial blur would be really odd (like squareroot 2.5) also I changed the old radius to this after the discussion in this thread.

Another thing currently I'm just using this formula to calculate the coefficient:
1/(2*pi*SD^2) * exp(-(x^2+y^2)/(2*SD^2))
but maybe it's more correct to use the mean value for the whole pixel. For instance when calculating the value for the center pixel I just set x=0 and y=0 but wouldn't it be more correct to use the area from x=-0.5 y=-0.5 to x=0.5 y=0.5?
tsp is offline   Reply With Quote
Old 24th May 2005, 22:50   #25  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
updated the filter to version 0.4. I fixed a bug when convering to unsigned char from float the result wasn't properly converted if outside the 0-255 range. It includes an unsharp filter for sharpening based on the gassianblur code so you can safely use big variance without affecting speed. I also added an option to use integrated gaussian coefficients.
tsp is offline   Reply With Quote
Old 12th December 2006, 07:29   #26  |  Link
bartrobinson
Registered User
 
Join Date: Mar 2005
Location: Fairfax, VA
Posts: 9
You know what would be really cool? If you could adjust the radius based on the luminance of a secondary clip input.
__________________
Bart Robinson
Dynavision|FX
bartrobinson is offline   Reply With Quote
Old 12th December 2006, 11:39   #27  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
bartrobinson: you mean the average luma of the second clip or local luma?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 13th December 2006, 05:48   #28  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
hmm. so you could do fast DOF, huh? or special denoising...
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 13th December 2006, 13:45   #29  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally Posted by bartrobinson View Post
You know what would be really cool? If you could adjust the radius based on the luminance of a secondary clip input.
Quote:
Originally Posted by tsp View Post
bartrobinson: you mean the average luma of the second clip or local luma?
(If you ask me -) not local luma of 1st clip, not average luma of 2nd clip. Local luma of 2nd clip.
Idea is: don't use just one radius for blurring all pixels in a frame, but:
blur each pixel using the radius that is given by luma value of the corresponding pixel in the 2nd clip. I.e. the filter would have two arguments like "min.radius" & "max.radius", and for filtering the 1st clip it would use min.radius where 2nd clip is zero, max.radius where 2nd clip is 255, and inbetween radii for 0<2ndClip<255.

The idea is good (it ever was :D), but I could imagine some problems regarding implementation, or regarding the speed of that filter's performance ... :oh-oh:
__________________
- 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 13th December 2006, 15:45   #30  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
Such a filter would be nice. But the main question is: Where to get this second clip with the luma-information? If the Idea is know where to get this second clip it could be implented directly in the plugin, so does not need a second clip...
krieger2005 is offline   Reply With Quote
Old 13th December 2006, 18:26   #31  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
It should be possible to modify the binomialblur code so that the radius is dependent on the local luma value. It will be somewhat slower than a normal binomialblur with max.radius. Also only integer values of radius will be supported (this will also apply to the interpolation).

Do you think it will be usefull?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/

Last edited by tsp; 13th December 2006 at 19:36.
tsp is offline   Reply With Quote
Old 13th December 2006, 19:34   #32  |  Link
bartrobinson
Registered User
 
Join Date: Mar 2005
Location: Fairfax, VA
Posts: 9
Luma from second clip. Basically a selective defocus or fake depth of field. Yes, it will likely be a little slow. Why only integer radius? Typically depth passes are in 32bit float (second clip). I'm guessing avisynth doesn't support that, so how about a mode to the filter that loads rgba channels separately and then stacks them for 4x256 levels of depth/luma info or some other similar hack.
__________________
Bart Robinson
Dynavision|FX
bartrobinson is offline   Reply With Quote
Old 13th December 2006, 20:03   #33  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
because the binomial blur code works with integer radius (to avoid multiplication in the code). But how strong blur do you need?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 22nd December 2006, 19:52   #34  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
One my russian friend (Drakon Rider) reports about some memory leakage with variableblur for big frame sizes 1920x1080, 100 frames eat 2 Gbytes.
img_src size is 4220х3294
I did not test it.

Code:
LoadPlugin("VariableBlur.dll")
 
Function GBlurRange (clip clin, int StartFrame, int EndFrame, float StartBlur, float EndBlur)
{
  clip_before=Trim(clin, 0, StartFrame-1)
  clip_after=Trim(clin, EndFrame+1, 0)
  clip_proc=Trim(clin, StartFrame, EndFrame)
 
  clip_proc=Animate(clip_proc, 0, EndFrame-StartFrame, "gaussianblur", StartBlur,StartBlur,3,false,3,3,3, EndBlur,EndBlur,3,false,3,3,3)
 
  return(clip_before+clip_proc+clip_after)
}
 
fps=30
 
src=ImageReader("img_src.bmp",fps=fps)
 
src=ConvertToYV12(src)
 
cl01=Crop(src,0,0,1920,1080)
 
cl02=Trim(cl01,0,fps*4)
 
cl02=GBlurRange(cl02,0,fps*4,80.0,0.1)
 
cl03=Trim(cl01, 0, fps)
 
stt01=BlankClip(cl02,length=fps*5).Subtitle("My Text01", align=8, size=70, first_frame=0, last_frame=fps*5, text_color=$7FFF00, halo_color=$2F2F2F).Coloryuv(levels="tv->pc")
maskstt01=Tweak(stt01,cont=10.0)
stt02=BlankClip(cl02,length=fps*5).Subtitle("Other Text 02", align=2, size=80, first_frame=0, last_frame=fps*5, text_color=$7FFF00, halo_color=$2F2F2F).Coloryuv(levels="tv->pc")
maskstt02=Tweak(stt02,cont=10.0)
 
cl02=overlay(cl02,stt01,mode="blend",mask=maskstt01)
cl02=overlay(cl02,stt02,mode="blend",mask=maskstt02)
 
intro=Dissolve(cl02,cl03,fps)
return(intro)
__________________
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.

Last edited by Fizick; 22nd December 2006 at 19:54.
Fizick is offline   Reply With Quote
Old 23rd December 2006, 22:49   #35  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@tsp: "float *realout;" might need some freeing.
__________________
Regards, sh0dan // VoxPod

Last edited by sh0dan; 23rd December 2006 at 22:57.
sh0dan is offline   Reply With Quote
Old 10th February 2007, 16:52   #36  |  Link
AlanHK
Registered User
 
Join Date: May 2006
Posts: 237
How to install

I've got the file:
variableblur_25_dll_20050524.zip

There are no installation instruction in the text file.
I guessed I should put variableblur.dll in Avisynth's plugins directory.
That didn't seem to make the functions active.

The text file mentioned an fftw file as being necessary.
Fetching that, again no installation instructions, or any text at all. So guessing again I get the fftw3.dll file from this and put it also in the Avisynth plugins directory.

Now I get a different error message when calling GaussianBlur

"LoadPlugin: Unable to load p:\Avisynth 2.5\plugins\VariableBlur.dll"

Which seems a step forward, at least the function seems to be known.

Can anyone advise how to install this?
AlanHK is offline   Reply With Quote
Old 10th February 2007, 17:10   #37  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
I've been confused by this plugin too; I put variableblur.dll (version 0.4) into the plugins folder, only to find that none of the functions described in the accompanying text file were available. There does seem to be a function called variableblur, but that isn't described in the text file!

David
wonkey_monkey is offline   Reply With Quote
Old 10th February 2007, 17:42   #38  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
You need to put fftw.dll in your system rout foulder, for windows xp that would be "C:\WINDOWS\Sytem32\".
*.mp4 guy is offline   Reply With Quote
Old 10th July 2008, 23:37   #39  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
*bump*

Ah, only now I see that the memory leakage of VariableBlur already has been reported.

Any hope to fix that issue? In its current state, VariableBlur is more or less unusable because of the leakage.

(And GaussianBlur is too slow to be a serious replacement, try on 720p or 1080 HD footage...)
__________________
- 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 August 2008, 14:10   #40  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Didée View Post
Ah, only now I see that the memory leakage of VariableBlur already has been reported.

Any hope to fix that issue? In its current state, VariableBlur is more or less unusable because of the leakage.
I haven't seen tsp in a while, so I made the patch. Try this and let me know how it works.

http://neuron2.net/misc/VariableBlur.dll
Guest 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 13:45.


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