Post #6 modified a bit , small functional difference
Code:
SSS="""
n = current_frame # Rem current frame
if(0 < n < FrameCount-1) {
current_frame = n - 1 # Point at Previous frame (n-1)
Prev = YDifferenceToNext # Diff between Previous Frame and current frame, dif(n-1 , n)
Alt = YDifferenceToNext(Offset=2) # Diff between Prev and Next Frame (either side of current_frame), dif(n-1 , n+1)
current_frame = n # Restore current_frame
Next = YDifferenceToNext # Diff between current frame and Next frame. dif(n , n+1)
if(DEBUG) {
RT_DebugF("%d] Prev=%f Next=%f Alt=%f",n,Prev,Next,Alt,name=myName)
}
if(Prev > THRESH && Next > THRESH && (Alt < Prev || Alt < Next)) { # Flag current frame for inspection
RT_WriteFile(LOG,"%d",n,Append=True) # I dont offhand know how to use new AVS+ log funcs.
RT_DebugF("%d] *** Prev=%f Next=%f Alt=%f",n,Prev,Next,Alt,name=myName) # Output to DebugView even if DEBUG=False
}
}
Return Last
"""
BLUE NO functional difference,
DARKORCHID small logical difference. [Was:-
Alt < Prev && Alt < Next]