Antiblink

Abstract

author: Kurosu
version: 2.2
requirements: YV12 & YUY2 colorspace only
syntax: AntiBlink(minvar,maxvar, debug)

Description

The rainbow artifacts are considered in this plugin as chroma oscillations. The filter therefore detects them by measuring chroma variation between frames for each pixel: there's a
shimmer if the chroma variation is over a threshold. Then it checks for the variation in luma
for those pixels and if this variation is over another threshold, those pixels are considered
as moving and not filtered. The other pixels are filtered by averaging the 'blinking' pixels
with their relative in the next picture.

There is another filter out there much more efficient, namely GuavaComb by Lindsey Dubb. Its advantages are:
- Also fix dot crawling (luma oscillations)
- can be setup to avoid ghosting in a much cleaner way.

AntiBlink2 filter is able to work in both YUY2 colorspaces and, contrary to GuavaComb, YV12
(great speed increase). Keep in mind it can't achieve miracles, as motion or noisy (or MPEG
like) video will diminish its efficiency.

Examples

Ex: Antiblink(10,20,false)

Parameters

No default, so set all options.
Minvar
Minimum value of the amplitude of the chroma variation. A good default is 15. Must be an
integer between 0 (enormous ghosting) and 255 (no effect, slow noop filter). Going over 30
is likely to be useless.

Maxvar
Maximal value of the luma variation before the pixel is considered as moving. A good value
is 20, but you have to choose between chroma correction and ghosting vs no filtering.
Setting it higher than 100 may produce unspotted ghosting in most frames due to motion, but
really bad frames are likely to come out. I haven't tested how it helps an ivtc filter.

debug=true/false
Display the matches in pink if set to true (also disable MMX code)

Code used
---------
No MMX code, as the previous version wasn't worth the trouble, and taking in consideration
motion was too complex in YV12.

Speed test (v2.2)
-----------------
Using a Duron 1300 (64KB cache) under W2K SP3 on a NSTC 720x480 MPEG-2 unmuxed vob, with parameters AntiBlink(5,20,false), so no debug display. Direct StreamCopy is used in VirtualDub_mod.

AVS 2.5 tests: MarcFD's Mpeg2dec3 0.94 (idct=2) was used. ConvertToYUY2 is used for YUY2 data.
fps
| None | C
-----+------+----
YV12 | 67 | 52
-----+------+----
YUY2 | 55 | 34

AVS 2.07 test: Nic's Mpegdecoder 1.32 (Dividee's MPEG2DEC plain achieves 40fps)
fps
| None | C
-----+------+----
YUY2 | 67 | 36

GuavaComb with parameters ("NTSC",75,25) achieves 45fps and better quality (to my eyes).