DeFlicker

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(redirect for convenient searching)
 
(DeFlicker: add documentation)
 
Line 1: Line 1:
#REDIRECT [[External_filters#Luma_Equalization]]
+
{{FilterCat5|External_filters|Plugins|Plugins_x64|Restoration_filters|Luma_Equalization}}
{{FilterCat|External_filters|Restoration_filters|Luma_Equalization}}
+
{{Filter3
 +
| {{Author/Fizick}}, {{Author/pinterf}}
 +
| v0.6
 +
|[https://github.com/pinterf/Deflicker/releases Deflicker-v0.6.7z]
 +
| Luma Equalization 
 +
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 +
|6=[https://forum.doom9.org/showthread.php?t=77487 Doom9 Thread]}}
 +
 
 +
== Description ==
 +
DeFlicker plugin can remove old film intensity flicker by temporal mean luma smoothing.  Also it can  correct blinding of automatic gain control after flashes.
 +
 
 +
The luma stabilizing not only improves visual impression, but can help to following noise reduction.  See included details documentation for technical details.
 +
<br>
 +
<br>
 +
== Requirements ==
 +
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]
 +
* [x64]: [[AviSynth+]]
 +
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
 +
<br>
 +
 
 +
== [[Script variables|Syntax and Parameters]] ==
 +
{{Template:FuncDef|Deflicker (clip, float "percent", int "lag", float "noise", int "scene", int "lmin", int "lmax", int "border", bool "info", bool "debug, int "opt")}}
 +
 
 +
<br>
 +
::{{Par2| |clip| }}
 +
:::Input clip
 +
<br>
 +
::{{Par2|percent|float|85.0}}
 +
:::Influence of previous frame mean luma (in percent) for temporal luma smoothing.
 +
:::Range: 0.0 to 100.0
 +
<br>
 +
::{{Par2|lag|int|25}}
 +
:::Max distance to base frame for process of mean luma estimation and compensation.
 +
<br>
 +
::{{Par2|noise|float|10.0}}
 +
:::Luma noise std deviation (due to motion etc).
 +
:::Range: 0.0 to 255.0
 +
<br>
 +
::{{Par2|scence|int|40}}
 +
:::Threshold for new scene (mean luma difference, or std variations doubled difference).
 +
:::Range: 0 to 255
 +
<br>
 +
::{{Par2|lmin|int|0}}
 +
::{{Par2|lmax|int|255}}
 +
:::Output luma min and max.
 +
:::Range: 0 to 255
 +
<br>
 +
::{{Par2|border|int|0}}
 +
:::Border width  at all edges (in pixels), which not used for estimation.
 +
:::Range: 0 to ?
 +
<br>
 +
::{{Par2|info|bool|false}}
 +
:::Show info and borders on frame.
 +
<br>
 +
::{{Par2|debug|bool|false}}
 +
:::Produce debug info for debugview utility.
 +
<br>
 +
::{{Par2|opt|int|-1}}
 +
:::opt. for testing slower processor code paths.
 +
:::* -1: auto
 +
:::* 0 : C
 +
:::* 1 : SSE
 +
:::* 2 : SSE2
 +
:::* 3 : AVX2
 +
 
 +
<br>
 +
 +
== Examples ==
 +
Using for flicker removing
 +
 
 +
When amateur film (16 or 18 or 24 fps) is transferred to video (25 or 30 fps) by simple projection method, the very big intensity flicker is produced.
 +
Even if special (per-frame) transfer apparatus is used, some flicker also exists due to non-steady (old !) film optical properties.
 +
 
 +
The default parameters set must be quite good. But you may tune its. Load video clip, set "info" parameter to true, analyze info (frames luma difference etc), and set appropriate scene parameter (or others).
 +
 
 +
Simple sample script:
 +
 
 +
Avisource("blah.avi")
 +
DeFlicker(scene=30)
 +
 
 +
<br>
 +
== Changelog ==
 +
Version      Date            Changes<br>
 +
v0.6        2019/05/23      - by pinterf
 +
                              - AVX2 and SSE2 support (was: ISSE in win32, plain C in x64)
 +
                              - does not overflow over 8Mpix
 +
                              - uses all pixels for non-YUY2 colorspaces in correction calculation
 +
                                (was: only even rows were summed up in calculating internal average luma and dev)
 +
v0.5        2019/05/22      - by pinterf
 +
                              - project move to Visual Studio 2019
 +
                              - Avisynth 2.6 interface, using headers from Avisynth+ project
 +
                              - Allow all 8 bit Y and YUV formats
 +
                              - x64 version (although C only)
 +
v0.4        2004/08/16      - add YUY2 support (still beta!), some speed increase (ISSE optimized).
 +
v0.3        2004/06/06      - add show border in info mode (still beta!).
 +
v0.2        2004/06/05      - add reverse mode, info (still beta!).
 +
v0.1        2004/06/03      - not public (beta!).
 +
 
 +
<br>
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="400px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Source Code
 +
|-
 +
!v0.4
 +
|[http://avisynth.org.ru/deflicker/deflicker04.zip deflicker04.zip]
 +
|[https://web.archive.org/web/20170620135019/http://avisynth.org.ru/deflicker/deflicker04.zip deflicker04.zip]
 +
|}
 +
<br>
 +
== External Links ==
 +
*[https://github.com/pinterf/Deflicker GitHub] - Source code repository.
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Luma_Equalization|External Filters]] &larr;'''

Latest revision as of 17:19, 24 March 2020

Abstract
Author Fizick, pinterf
Version v0.6
Download Deflicker-v0.6.7z
Category Luma Equalization
License GPLv2
Discussion Doom9 Thread

Contents

[edit] Description

DeFlicker plugin can remove old film intensity flicker by temporal mean luma smoothing. Also it can correct blinding of automatic gain control after flashes.

The luma stabilizing not only improves visual impression, but can help to following noise reduction. See included details documentation for technical details.

[edit] Requirements


[edit] Syntax and Parameters

Deflicker (clip, float "percent", int "lag", float "noise", int "scene", int "lmin", int "lmax", int "border", bool "info", bool "debug, int "opt")


clip   =
Input clip


float  percent = 85.0
Influence of previous frame mean luma (in percent) for temporal luma smoothing.
Range: 0.0 to 100.0


int  lag = 25
Max distance to base frame for process of mean luma estimation and compensation.


float  noise = 10.0
Luma noise std deviation (due to motion etc).
Range: 0.0 to 255.0


int  scence = 40
Threshold for new scene (mean luma difference, or std variations doubled difference).
Range: 0 to 255


int  lmin = 0
int  lmax = 255
Output luma min and max.
Range: 0 to 255


int  border = 0
Border width at all edges (in pixels), which not used for estimation.
Range: 0 to ?


bool  info = false
Show info and borders on frame.


bool  debug = false
Produce debug info for debugview utility.


int  opt = -1
opt. for testing slower processor code paths.
  • -1: auto
  • 0 : C
  • 1 : SSE
  • 2 : SSE2
  • 3 : AVX2


[edit] Examples

Using for flicker removing

When amateur film (16 or 18 or 24 fps) is transferred to video (25 or 30 fps) by simple projection method, the very big intensity flicker is produced. Even if special (per-frame) transfer apparatus is used, some flicker also exists due to non-steady (old !) film optical properties.

The default parameters set must be quite good. But you may tune its. Load video clip, set "info" parameter to true, analyze info (frames luma difference etc), and set appropriate scene parameter (or others).

Simple sample script:

Avisource("blah.avi")
DeFlicker(scene=30)


[edit] Changelog

Version      Date            Changes
v0.6 2019/05/23 - by pinterf - AVX2 and SSE2 support (was: ISSE in win32, plain C in x64) - does not overflow over 8Mpix - uses all pixels for non-YUY2 colorspaces in correction calculation (was: only even rows were summed up in calculating internal average luma and dev) v0.5 2019/05/22 - by pinterf - project move to Visual Studio 2019 - Avisynth 2.6 interface, using headers from Avisynth+ project - Allow all 8 bit Y and YUV formats - x64 version (although C only) v0.4 2004/08/16 - add YUY2 support (still beta!), some speed increase (ISSE optimized). v0.3 2004/06/06 - add show border in info mode (still beta!). v0.2 2004/06/05 - add reverse mode, info (still beta!). v0.1 2004/06/03 - not public (beta!).


[edit] Archived Downloads

Version Download Source Code
v0.4 deflicker04.zip deflicker04.zip


[edit] External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools