ExactDedup v0.07
Copyright (c) 2011 Steve Melenchuk, Arick Chan
==============================================

0. Table of Contents
--------------------
  1. Introduction
  2. Usage
  3. Licensing

1. Introduction
---------------
ExactDedup is an AVISynth 2.58/v2.60/+ x86 & x64 plugin providing a filter intended to remove
frames that are EXACT DUPLICATES of each other, leaving only the first and
(optionally) last frames of a run intact, and generates a Matroska v2
timecodes file with timing information for the ensuing stream.
NOTE, 'EXACT DUPLICATE' means exactly that, ie completely and bit for bit IDENTICAL.

Due to the particulars of the AVISynth API, ExactDedup requires two passes
to function efficiently. It could theoretically be designed to run with
one pass, but this would result in a very long startup delay while the
plugin precomputes all of the duplicate frame information and timecodes.

ExactDedup supports any standard v2.60 input colorspace.

You will need the Visual C++ 2008 runtimes (i.e. MSVCR90.dll) to be able
to run this plugin.

2. Usage
--------

ExactDedup(clip [, bool firstpass] [, string dupinfo], [, string times]
           [, int maxdupcount] [, bool keeplastframe] [,bool show])

Options:
- firstpass    : Default true. Controls which pass the plugin is running.

                 The first pass generates a mapping of output frames to
                 input frames (stored in the file specified by dupinfo) and
                 Matroska v2 timecodes (stored in the file specified by
                 times); seeking during this pass is impossible.
				 If not completely linear access from beginning to end of clip, then
				 will abandon processing, you cannot jump around the clip, and should not
				 use any multi processing (MT) methods.

                 The second pass generates a video stream containing only
                 the frames specified in the dupinfo file. (Seeking is
                 permissible during this pass.)

- dupinfo      : Default "dupinfo.txt". The name of a temporary file
                 generated by the first pass and read by the second pass;
                 each line corresponds to a frame in the output video
                 stream, and specifies the frame number of the frame in
                 the input stream that will be used as that output frame.
				 Note, Dupinfo/Times files deleted before pass one commences,
				 sends a message to the debug stream when dupinfo successfully written (Google DebugView).

- times        : Default "times.txt". The name of the Matroska v2 timecodes
                 file that will be output by the first pass.

- maxdupcount  : Default 20. The number of maximum consecutive duplicate
                 frames corresponding to a single frame of the output; i.e.
                 a maximum of (maxdupcount - 1) frames will be removed from
                 a run of duplicates before another frame is kept.
                 [ssS: 0 disables maxdupcount]

- keeplastframe: Default false. Keeps the last frame of a run of duplicates.
                 If a run of duplicates is larger than maxdupcount, this
                 keeps only the last frame of the entire run, not of the
                 individual maxdupcount-size blocks.

- Show         : Default false. If True, shows a little info on second pass.

3. Licensing
------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

#####################################################################

v0.07 (04 June 2021) (StainlessS)
    Switched to DDigit v2.0 Metrics renderer for Show=true.
    Added HBD for Avs+ [all colorspaces, Avs+ frame Properties NOT supported nor passed to next filter]

v0.06 (15 Feb 2019) (StainlessS)
	Moved to VS2008, Added Version resource + x64. Req VS2008 Runtimes. Fixed M$ broken relative pathnames.

ExactDedup 0.04 (2017-Feb-16) (StainlessS)
- fixed number of bugs
- Avisynth v2.6 plugin.
- Added Support for v2.6 Planar (also added U & V chroma scan for Planar, only scanned luma).
- Added Show Arg.
- Write times and dupinfo files at end of scan, so you dont have to edit script in text editor before second pass.
- No runtime dependency.

###

ExactDedup 0.03 (2011-12-17)
- Switch from AVISynth API v3 to v2 for compatibility with earlier versions
  of AVISynth.
- Fixes for incompatibility with Crop() and some use with VirtualDub
  (courtesy of Aktan).
- 64-bit binary also available (courtesy of Velitha).

ExactDedup 0.02 (2011-11-17)
- Reworked timecode output to avoid integer overflows with some framerates
  (such as the NTSC NES framerate) and to output to nanosecond precision.

ExactDedup 0.01 (2011-11-15)
- Initial release.
