Compare

From Avisynth wiki
Revision as of 05:27, 4 July 2013 by Raffriff42 (Talk | contribs)

Jump to: navigation, search

Compare(clip_filtered clip, clip_original clip, string channels, string logfile, bool show_graph)

This filter compares the original clip "clip_original" and its filtered version "clip_filtered". The filtered version will be returned with the results of the comparison. Per frame the Mean Absolute Difference, Mean Difference and Peak signal-to-noise ratio (PSNR) is given, as well as the min (minimum), avg (average) and max (maximum) PSNR up to that frame (calculated frame-wise). Starting from v2.53, the 'Overall PSNR' (calculated over all pixels in all frames) is also shown on the output clip.

The channels (default "") string is a combination of R,G,B [,A] or Y,U,V, depending on the source clips. If it is empty (default), it means either "YUV" when the input clips are YCbCr or "RGB" when in the input clips are RGB.

If show_graph (default true) is true then Marc's PSNR graph is also drawn on it.

If a logfile is specified, the results will be written to a file by this name and not drawn on the clip. It is much faster if you need to compare a lot of frames.

Examples:

# displays differences on screen:
Compare(clip1, clip2)
# for creating a log file:
Compare(clip1, clip2, "", "compare.log")
# will only compare chroma channels of YUY2 clips:
Compare(clip1, clip2, "UV")


Changes:

v2.58 Added YV12 support.
Personal tools