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. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th August 2008, 12:13 | #41 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
Playing this script in Vdub & eyeballing memory usage in TaskManager: Code:
SetMemoryMax(64) # LoadPlugin(" ... \VariableBlur_v04.dll") LoadPlugin(" ... \VariableBlur_memfix1.dll") ColorBars(pixel_type="YV12") b1 = BinomialBlur(vary=2.5,varc=2.5,Y=3,U=3,V=3) b2 = BinomialBlur(vary=3.5,varc=3.5,Y=3,U=3,V=3) b3 = BinomialBlur(vary=5.5,varc=5.5,Y=3,U=3,V=3) b4 = BinomialBlur(vary=8.0,varc=8.0,Y=3,U=3,V=3) merge( merge(b1,b2), merge(b3,b4) ) return( last ) After ~2000 frames, it's ~200.000 K. After ~8000 frames, it's ~500.000 K, and keeps growing. All I can guesstimate is that it's related to the "repeated" appliance of the 5x5 kernel filter: when using only small variances (all vary,varc = 1.0, which can be computed with one single instance of a 5x5 kernel), then memory usage consolidates at ~112.000 K after ~700 frames, and doesn't grow any more.
__________________
- 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!) |
|
30th August 2008, 12:45 | #44 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Oops, time goes by so fast.
It seems your changes fixed the problem, memory usage is stable now. Thank you very much! If you could up the changed sources, we could update the common places (Warpenterprises and tsp's page, if we get them).
__________________
- 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!) |
30th August 2008, 13:19 | #45 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
http://neuron2.net/misc/VariableBlur.zip Thank you for your test results. |
|
16th October 2008, 07:50 | #46 | Link |
Dolphin Blue
Join Date: Mar 2007
Posts: 336
|
with variableblur, (both neuron2's last build and tritical's)
calling gaussianblur() and unsharp() results in the error: evaluate: system exception - access violation anyone else get that? edit: avisource("blah") gaussianblur()
__________________
injected with feelings; with no final fading Last edited by 45tripp; 16th October 2008 at 08:50. Reason: script post |
16th October 2008, 08:29 | #47 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
__________________
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. |
16th October 2008, 09:33 | #48 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Works fine here. Do you get that error immediately upon loading the script, or at some point during processing?
Poke in the blue - perhaps it's related to fftw3.dll in /system32, resp. to the version of that dll? I vaguely remember that there had been updates of that dll, but then there had been discussions about some problems... I've an (supposely) older version of it -- file date 2004-01-30, size 1589 kB (Dll does not show a version number in its properties).
__________________
- 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!) |
16th October 2008, 22:14 | #49 | Link | ||
Dolphin Blue
Join Date: Mar 2007
Posts: 336
|
Quote:
Quote:
don't remember where i got the one i'd been working with. it's got a 2008 date. but the one hosted at warpenterprises works. ty tripp
__________________
injected with feelings; with no final fading |
||
30th November 2008, 17:45 | #51 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
You could futz something in like this, (in pseudo code):
luma = getLuminance(clip2) strength = (luma < thr1) ? value1 : (luma < thr2) ? value2: (luma < thr3) ? value3: value4 Gaussianblur(strength) replace thr1-4, value1-4 with appropriate thresholds/strengths, and then find some function that would get the luminance level of second clip and return a number. All very easy. Edit: If I could figure out why the hell my avisynth throws an error every time I try to call AverageLuma(), I could make a better script but here's an example for you: Code:
Avisource("..") clip1 = last clip2 = clip1.SomeFilter() # or another source clip. luma = AverageLuma(clip2) thresh1 = 30 thresh2 = 60 thresh3 = 120 thresh4 = 200 str1 = 5 str2 = 4 str3 = 3 str4 = 4 str5 = 6 strength = (luma <= 30) ? str1 : (luma <= 60) ? str2 : (luma <= 120) ? str3 : (luma <= 200) ? str4 : str5 GaussianBlur(strength)
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame. Last edited by Sagekilla; 30th November 2008 at 18:03. |
30th November 2008, 19:50 | #53 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
|
|
30th November 2008, 23:52 | #54 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
Ah that explains things a lot. Thanks.
The idea more or less remains the same. Use a function to get the luminance level, then use the strength you want for whatever threshold it is.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame. |
1st December 2008, 01:26 | #55 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Think a little further out of the box. Varying the radius on a per-frame basis is not very interesting.
The interesting idea is to vary the radius on a per-pixel level, i.e. the control clip tells which radius to use for processing each pixel of the source clip. Which is impossible to construct through a script, it requires plugin support.
__________________
- 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!) |
1st December 2008, 08:48 | #57 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
hmm... interesting. you feed it an alpha channel and it blurs according to it's brightness.
i see possibilities with fake depth of field using mvtools to construct a depth map...
__________________
sucking the life out of your videos since 2004 |
1st December 2008, 09:06 | #58 | Link |
also known as GrassHoppeR
Join Date: Mar 2006
Location: Poland
Posts: 30
|
i did it with pure avisynth: http://forum.doom9.org/showthread.php?t=143186
but it's still a fake. i'm dreamin' about real compound blur plugin. xmas coming soon... pozdrawiam |
4th December 2008, 10:48 | #59 | Link | ||
also known as GrassHoppeR
Join Date: Mar 2006
Location: Poland
Posts: 30
|
Quote:
Quote:
http://members.lycos.co.uk/grasshopper/dof/ <-example and files http://members.lycos.co.uk/grasshopper/dof/ghrchb.dll <-GHRCompoundHBlur plugin http://members.lycos.co.uk/grasshopp...poundHBlur.cpp <-source code it works only in x-axis and needs some optimalization (or maybe ass and mmx code? ) but it WORKS! what you think? below is the main loop code. maybe someone has an issue how to improve its speed, blurring near the edge and so, that you can find it useful too. but first of all it must not crash! i'm not experienced cpp writer so please check my source code. Code:
for (i=0; i < (src_height-32); i++) { for (w=64; w<(src_width-64); w+=4) { v = *(srcp + w + 3); a = (v & 15); b = (v & 240)>>2; ub = a*(*(srcp + w - b - 4)+*(srcp + w + b + 4)); ug = a*(*(srcp + w - b - 3)+*(srcp + w + b + 5)); ur = a*(*(srcp + w - b - 2)+*(srcp + w + b + 6)); lb=lg=lr = 0; for (j=-b; j<=b; j+=4){ lb+=*(srcp + w+j); lg+=*(srcp + w+j+1); lr+=*(srcp + w+j+2); } n = 16+v+v; *(dstp + w) = (lb*16+ub)/n; *(dstp + w+1) = (lg*16+ug)/n; *(dstp + w+2) = (lr*16+ur)/n; *(dstp + w+3) = v; } srcp+=src_pitch; dstp += dst_pitch; } |
||
4th December 2008, 18:12 | #60 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
try replace slow dividing by approximation: multiplication with shift.
like this: n=... d=(1<<16)/n; *(dstp+w)= ((lb*16+ub)*d)>>16
__________________
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|