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. |
1st January 2013, 22:39 | #642 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Debugging help needed
I'm finally going completely crazy. I have narrowed down the python memory leak quite a bit but I just can't explain the last part. If anyone happens to be good at debugging python (perhaps you've even used cython too) memory leaks and want to help please contact me. I have a fairly simple case that can reproduce the issue but I simply don't know what triggers it in the first place.
Unless this bug is found it will never be possible to simply press F2 again and again in vdub to refresh a script.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
2nd January 2013, 18:56 | #643 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
quick update for Waf version.
Code:
Index: bootstrap.py =================================================================== --- bootstrap.py (revision 405) +++ bootstrap.py (working copy) @@ -2,7 +2,7 @@ import os, stat, urllib2 -f = urllib2.urlopen('http://waf.googlecode.com/files/waf-1.7.6') +f = urllib2.urlopen('http://waf.googlecode.com/files/waf-1.7.8') with open('waf', 'wb') as waf: waf.write(f.read()) |
2nd January 2013, 19:17 | #644 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
Anyway, applied.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
4th January 2013, 07:57 | #645 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Cleanup for some of the invert_example.c comments: https://gist.github.com/4450489
|
4th January 2013, 17:50 | #646 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
4th January 2013, 22:49 | #647 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Excellent, good to hear. I've begun work on my CUDA environment. I'm getting used to the Waf build system and incorporating the CUDA compiler into the mix. It's almost up an ready for dev, but I've got a few CFLAGS issues to fix first.
|
5th January 2013, 11:28 | #648 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
I have no optimized code for it so just use exp and log to get the same result.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
5th January 2013, 21:38 | #649 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
Code:
mt_lut("x 128 - 1.49 * x 128 - 2 ^ x 128 - 2 ^ 9 + / * 128 +") |
|
5th January 2013, 23:09 | #650 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
Code:
"x 128 - 1.49 * x 128 - dup * dup 9 + / * 128 +" When you go from a lut to actually evaluating the expression for every pixel you have to be more careful about how you write it too or it could become slow. Bonus material by jfs, the original expression in readable form: Code:
(x-128)*1.49 * (((x-128)^2) / ((x-128)^2 + 9)) + 128
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
6th January 2013, 02:44 | #651 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
Code:
avs = core.avs.mt_lut(c1=src, expr="x 128 - 1.49 * x 128 - 2 ^ x 128 - 2 ^ 9 + / * 128 +", Y=3, U=1, V=1) vs = core.std.Expr(clips=[src], expr=["x 128 - 1.49 * x 128 - dup * dup 9 + / * 128 +", "", ""]) |
|
7th January 2013, 00:37 | #652 | Link | ||
Oz of the zOo
Join Date: May 2005
Posts: 208
|
Quote:
What about "something something ^"? Also the calculation is done only once while building lut table, so the overhead may safely be neglected. Quote:
There are lots of useful scripts with very complex expressions. Last edited by wOxxOm; 7th January 2013 at 00:52. |
||
7th January 2013, 00:58 | #654 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
so you rewrite it to: a log x * exp (or something log 1.05 * exp) And I have to reiterate that just copying and pasting expressions is kind of a bad idea for performance reasons. Just take the one I changed around above as an example.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 7th January 2013 at 00:59. Reason: typo |
|
7th January 2013, 12:17 | #656 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
lutxyz requires at least about 16MiB(256*256*256*1byte).
Since a huge table is not settled in CPU cache, it may need very very slow memory access each time. Therefore, runtime calcuration is often faster than LUT.
__________________
my repositories Last edited by Chikuzen; 7th January 2013 at 12:33. |
7th January 2013, 13:44 | #657 | Link |
Oz of the zOo
Join Date: May 2005
Posts: 208
|
Chikuzen, is this somehow related to my remarks about the majority of lut scripts, taking in account that lutxyz should be avoided at all costs and thankfully not commonly used anyway? Also, don't forget that memory access penalty during building of that 16MB table is *nothing* compared with memory penalty during processing of lots of actual video frames.
|
7th January 2013, 14:13 | #658 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
It is lut access during processing of video frames that will have a heavy cache miss penalty.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
7th January 2013, 14:27 | #659 | Link |
Oz of the zOo
Join Date: May 2005
Posts: 208
|
StainlessS, I wrote about the same earlier, and to reiterate my point I'll rephrase: having a cpu-heavy instructions in expressions (like "^" - power) takes only an insignificant amount of overall processing time (it's calculated only one time, not each frame) so there's no need to exclude those in favour of non-practical 'performance gains' while degrading substantially ease of porting for existing lut-scripts.
Last edited by wOxxOm; 7th January 2013 at 14:29. |
7th January 2013, 14:31 | #660 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
People who like faith-based optimizations may note that expr() isn't really any significantly slower than mt_lutxy[z] in many cases; for simple expressions it can even be faster than mt_lutxy. Last edited by TheFluff; 7th January 2013 at 14:34. |
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|