bus_labi
17th January 2011, 09:14
Hello anyone,
I wrote a script to test different settings of two variables of fft3dfilter (sigma and block size). I used Gscript and nested while loops, but for some reason i can not get it to work. Whatever i do only the inner while loop is executed. Could it be that nested while loop is not supported within Gscript (documentation is not 100% clear on that). Possibly something very simple i am overlooking ... any help will be appreciated.
sigma_start = 1.5
sigma_incr = 0.5
sigma_finish = 3.0
bs_start = 16
bs_incr = 16
bs_finish = 64
c = DirectShowSource ("2001 03 229.avi").converttoyv12
global c2 = BlankClip(c, length=0)
GScript ("""
while (sigma_start <= sigma_finish)
{
while (bs_start <= bs_finish)
{
fft3dfilter (c, sigma = sigma_start, bh = bs_start, bw = bs_start,\
measure = true, interlaced = true, ncpu = 6)
Subtitle(last, "sigma = " + String(sigma_start) + "\n bsize = " + String(bs_start), align=9, lsp=0)
c2 = c2 + last
bs_start = bs_start + bs_incr
Return(c2)}
sigma_start = sigma_start + sigma_incr }
""")
return (c2)
I wrote a script to test different settings of two variables of fft3dfilter (sigma and block size). I used Gscript and nested while loops, but for some reason i can not get it to work. Whatever i do only the inner while loop is executed. Could it be that nested while loop is not supported within Gscript (documentation is not 100% clear on that). Possibly something very simple i am overlooking ... any help will be appreciated.
sigma_start = 1.5
sigma_incr = 0.5
sigma_finish = 3.0
bs_start = 16
bs_incr = 16
bs_finish = 64
c = DirectShowSource ("2001 03 229.avi").converttoyv12
global c2 = BlankClip(c, length=0)
GScript ("""
while (sigma_start <= sigma_finish)
{
while (bs_start <= bs_finish)
{
fft3dfilter (c, sigma = sigma_start, bh = bs_start, bw = bs_start,\
measure = true, interlaced = true, ncpu = 6)
Subtitle(last, "sigma = " + String(sigma_start) + "\n bsize = " + String(bs_start), align=9, lsp=0)
c2 = c2 + last
bs_start = bs_start + bs_incr
Return(c2)}
sigma_start = sigma_start + sigma_incr }
""")
return (c2)