File: Readme_DctFilter.txt
// DctFilter - DCT/IDCT Frequency Suppressor
// Copyright (C) 2002 Tom Barry - trbarry@trbarry.com
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also, this program is "Philanthropy-Ware". That is, if you like it and feel
the need to reward or inspire the author then please feel free (but not obligated)
to consider joining or donating to the Electronic Frontier Foundation. This will
help keep cyber space free of barbed wire and bullsh*t.
See their web page at www.eff.org
***************
Okay, on to business.
WARNING - This version only runs on the Avisynth 2.5 alpha release.
DctFilter is an experimental filter that, for each 8x8 block, will do a
Discrete Cosine Transform (DCT), scale down the selected frequency values,
and then reverse the process with an Inverse Discrete Cosine Transform (IDCT).
USAGE - To use it just:
1) Place the DctFilter.dll in a directory somewhere. You can get it from
www.trbarry.com/DctFilter.zip
2) In your Avisynth file use commands similar to
LoadPlugin("F:\DctFilter\DctFilter.dll")
Avisource("D:\wherever\myfile.avi")
DctFilter(1,1,1,1,1,1,.5,0)
Of course replace the file and directory names with your own.
Parameters:
There are 8 positional floating point parameters, all of which must be
specified as in the range (0.0 <= x <= 1.0). These correspond to scaling
factors for the 8 rows and colums of the 8x8 DCT blocks. The leftmost
parm corresponds to the top row, left column. This would be the DC component
of the transform and should always be left as 1.0.
In the above example the highest frequency components in each row and column would
be zeroed while the 2nd highest would be cut in half.
The row & column parms are multiplied together to get the scale factor for
each of the 64 values in a block. So if the top left value was V[0,0] then in
the example above the we would scale row 6, col 6 (V[6,6]) by .5*.5 = .25.
Note that while they look like floating point parms above they really now only
have 3 bit accuracy so the only actual values used are 0, 1/8, 1/4, 3/8 ... 1.0.
But you can specify any value and it will be rounded to the nearest one.
KNOWN ISSUES AND LIMITATIONS
1) Avisynth 2.5 YV12 & YUY2 only.
2) This test version only supports screen multiples of 16x16 so crop or
add borders first if needed.
FILE LOCATIONS
For now, both source, this readme, and DLL should be at:
www.trbarry.com/DctFilter.zip
A copy of this Readme_DctFilter.txt file should be at:
www.trbarry.com/Readme_DctFilter.txt
***************
Change Log:
Date Ver Developer Notes
2002/11/25 V 0.0.1.3 Tom Barry Avisynth 2.5 beta, plugininit2, vs6
2002/11/2? V 0.0.1.2 SansGrip YUY2 support
2002/11/25 V ? Tom Barry Initial test release for Avisynth 2.5 alpha only