@Sh0dan : Very cool!:cool: How about the following set:- MinLuma() blackest pixel MaxLuma() whitest pixel Probably not quite so useful (signed values) . MinChromaU() . MaxChromaU() . MinChromaV() . MaxChromaV() Maybe more useful as absolutes . MinAbsChromaU() . MaxAbsChromaU() . MinAbsChromaV() . MaxAbsChromaV() More likely just to want the saturation (sqrt(U'^2+V'^2)) values . MinChromaUV() or MinSaturation() . MaxChromaUV() or MaxSaturation() . AverageChromaUV() or AverageSaturation() Possibly other statistical measures like Median value or upper and lower quartiles could be good as well. Also nothing in AviSynth says a plugin/filter has to return a Clip (they just all seem to). There are already functions like FrameRate() that return non-clip values ;) so you probably don't need to build the world into this Filter. IanB
@MustardMan: Follow the second link in my signature. Actually both your scripts are correct. :) If you don't specify a clip, the "testclip" is used as "implicit last". @IanB: Yes - further single image statistical functions are in the works, and more compare functions should also be done.
How bout something that can choose the frame with the least interlacing? I'm thinking of clips that are hard to IVTC then you could feed it both the IVTC2 and the Decombed version and get the best in return.
1) You are right, "n" as frame number may be a little short. But is it now frame_number or current_frame (I would prefer frame_number or maybe only frame) 2) I still don't understand why you use three parameters instead of one string evaluating to a bool. It would be much clearer to script writers. 4) what does that mean: when you reference a video clip ... it will be represented by the value it has at the end of the script? Putting a clip in the condition function feeds not the current value but the last in the script? That means it is strongly suggested to only use implicit last as this is how you feed the testclip? 5) I suppose the two choice clips must have the same video properties 6-9) very great - now using AviSynth gets really funny :)
Added the following conditional functions: YDifferenceFromPrevious() UDifferenceFromPrevious() VDifferenceFromPrevious() and YDifferenceToNext() UDifferenceToNext() VDifferenceToNext() These should be quite handy for detecting scene change transitions: Example: conditionalfilter(last,last,last.trim(1,0),"YDifferenceToNext()",">","10", show=true) This will replace the last frame before a scenechange with the first frame after the scenechange. (Inspired by another thread). This made me think of: Audio is always passed untouched through, from the testclip for now. The CVS Binary is dated April 3rd.
-------------------- "What we do today, echoes and eternity".
@sh0dan I've just realized this is the first frame-by-frame evaluation and conditional filtering ever done in Avisynth! :D Way to go, sh0dan! Haven't tried it yet, it seems we can use any variables, right? Now if we could have an "exists filename" condition and variable import... ;) I've got to show this to Ddogg :D Bilu