View Single Post
Old 8th June 2007, 17:14   #1074  |  Link
plugh
A hollow voice says
 
Join Date: Sep 2006
Posts: 269
I noticed some puzzling results from a script that uses cframediff.

Dug into it, and eventually distilled it down to the following which illustrates the behaviour.

Code:
Version().converttoyuy2()

frameevaluate("NOP()")

Writefile("avstst1.txt"\
,	"((current_frame==3) && (cframediff(prevf=false) >= 0))"\
,	"current_frame"\
)
This generates the following output:
Code:
false0
false1
false2
true4
false4
false5
false6
false7
If prevf is set true, you get correct output (ie 'true3').
If the frameevaluate is deleted, you get correct output.

a cframediff buglet?
avisynth weirdness??
stupidity on my part???

Is this cosmetic, or is something getting fundamentally borked?

My application script uses both prevf=true and prevf=false, uses writefileIF rather than writefile, and has a number of scriptclips rather than the frameevaluate. It also has a fair number of references to 'current_frame' other than in the output statement.

I am using avisynth 2.5.6 and tivtc 1.0.2

EDIT: Oh yeah, forgot to ask...

When I look at the debug output of, for example, tdecimate(mode=0), part of the display are some number that I assume are 'normalized framediff metrics'. I also assume that the results from cframediff should be the same as those.

They are not. With identical args (blockx, blocky, chroma, nt) I get somewhat similar, but not identical results.

Are one of my assumptions incorrect?

For example:
Quote:
TDecimate: 968: 0.02 0.03 0.03 0.01 2.54 0.04 0.09 0.04 1.09 0.08 0.12 0.09 0.02 2.55 0.00 0.03 0.14 0.01 0.76 0.08 0.00 0.08 0.05 1.46 0.02 0.03 0.06 0.01 0.62 0.00 0.02 0.12 0.01 2.71 0.05 0.01 0.16 0.05 1.56 0.03 0.04 0.16 0.01 1.77
TDecimate: 968: x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
TDecimate: 792: Dropping Frames: 969 974 978 983 987 993 997 1003
output from a script (related to above) -
first value is prevf=true, second is prevf=false
(I think; as you can see 'true' output is borked,
so I'm not sure what I'm *really* getting, but
the first column is similar to the above)
Quote:
true969 - 0.137566 0.115047
false969 - 0.137566 0.115047
false970 - 0.115047 0.063989
false971 - 0.063989 2.397595
false972 - 2.397595 0.086843
true974 - 0.208690 0.134556
false974 - 0.208690 0.134556
false975 - 0.134556 1.227280
false976 - 1.227280 0.184499
false977 - 0.184499 0.239236
true979 - 0.178479 0.062206
false979 - 0.178479 0.062206
false980 - 0.062206 2.563254
false981 - 2.563254 0.001561
false982 - 0.001561 0.115493
true984 - 0.266325 0.045261
false984 - 0.266325 0.045261
false985 - 0.045261 0.952706
false986 - 0.952706 0.173351
false987 - 0.173351 0.000000
true989 - 0.185837 0.134333
false989 - 0.185837 0.134333
false990 - 0.134333 1.654136
false991 - 1.654136 0.104568
false992 - 0.104568 0.128536
true994 - 0.180597 0.069563
false994 - 0.180597 0.069563
false995 - 0.069563 0.793401
false996 - 0.793401 0.000000
false997 - 0.000000 0.088180
true999 - 0.270673 0.060756
false999 - 0.270673 0.060756
false1000 - 0.060756 3.016084
false1001 - 3.016084 0.183273
false1002 - 0.183273 0.029654
true1004 - 0.237340 0.162092
false1004 - 0.237340 0.162092
false1005 - 0.162092 1.813664
false1006 - 1.813664 0.117277
false1007 - 0.117277 0.149383
true1009 - 0.245924 0.060756
false1009 - 0.245924 0.060756
false1010 - 0.060756 2.123355
false1011 - 2.123355 0.041470
false1012 - 0.041470 0.095538

Last edited by plugh; 8th June 2007 at 18:28.
plugh is offline   Reply With Quote