FluxSmooth
(New version) |
(cosmetics and minor changes) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{FilterCat6|External_filters|Plugins|Plugins_x64|Denoisers|Spatial-Temporal Denoisers|Deep_color_tools}} |
[[Category:Plugins]] | [[Category:Plugins]] | ||
{{Filter3 | {{Filter3 | ||
− | | {{Author/SansGrip}} | + | | {{Author/SansGrip}}, {{Author/pinterf}} |
| v1.4 | | v1.4 | ||
| [https://github.com/pinterf/FluxSmooth/releases FluxSmooth 1.4] | | [https://github.com/pinterf/FluxSmooth/releases FluxSmooth 1.4] | ||
| Spatial-Temporal Denoisers | | Spatial-Temporal Denoisers | ||
|'' "There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will" '' | |'' "There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will" '' | ||
− | |6=[ | + | |6=[https://forum.doom9.org/showthread.php?t=38296 Doom9 Thread (original)]<br>[https://forum.doom9.org/showthread.php?t=176246 Doom9 Thread (update)]}} |
== Description == | == Description == | ||
Line 15: | Line 15: | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | * AviSynth 2.6 | + | * [x86]: [[AviSynth+]] or [http://sourceforge.net/projects/avisynth2/ AviSynth 2.6] |
+ | * [x64]: [[AviSynth+]] | ||
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only | * [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only | ||
− | * Supported color formats: All 8- | + | * Supported color formats: [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]] |
+ | **AviSynth+: All [[planar]] formats (8/10/12/14/16-bit, Y, YUV, and RGB) are supported. | ||
+ | |||
+ | * AviSynth+ to enable AVX2 or AVX512 support. | ||
<br> | <br> | ||
== Limitations == | == Limitations == | ||
*The very edges of the frame are unprocessed. | *The very edges of the frame are unprocessed. | ||
− | *The very first and very last frame of a clip | + | *The very first and very last frame of a clip are left unprocessed. |
<br> | <br> | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
Line 57: | Line 61: | ||
FluxSmoothT with default settings: | FluxSmoothT with default settings: | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
− | FluxSmoothT(temporal_threshold=7) | + | FluxSmoothT(temporal_threshold=7, luma=true, chroma=true) |
<br> | <br> | ||
FluxSmoothST with default settings: | FluxSmoothST with default settings: | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
− | FluxSmoothST(temporal_threshold=7, spatial_threshold=7) | + | FluxSmoothST(temporal_threshold=7, spatial_threshold=7, luma=true, chroma=true) |
<br> | <br> | ||
== Changelog == | == Changelog == | ||
Line 68: | Line 72: | ||
Available processor flags can be shown through the .Info() filter in Avisynth+. | Available processor flags can be shown through the .Info() filter in Avisynth+. | ||
New value for 'opt': opt=4 means forced AVX512. Error message if system does not support those AVX512 flags. | New value for 'opt': opt=4 means forced AVX512. Error message if system does not support those AVX512 flags. | ||
− | - Moved to Visual Studio 2019 (xp builds: Microsoft C++, main builds: LLVM clang) | + | - Moved to Visual Studio 2019 (xp builds: Microsoft C++, main builds: LLVM clang)<br> |
v1.3 2019/04/02 - Changes by pinterf | v1.3 2019/04/02 - Changes by pinterf | ||
- project moved to github: https://github.com/pinterf/FluxSmooth | - project moved to github: https://github.com/pinterf/FluxSmooth | ||
Line 78: | Line 82: | ||
- Drop all inline assembly, SIMD intrinsics based on C code, SSE2, SSE4.1 and AVX2 optimizations | - Drop all inline assembly, SIMD intrinsics based on C code, SSE2, SSE4.1 and AVX2 optimizations | ||
- Single DLL, optimizations for different CPU instruction sets are chosen automatically. | - Single DLL, optimizations for different CPU instruction sets are chosen automatically. | ||
− | - Reports MT Modes for Avisynth+: MT_NICE_FILTER | + | - Reports MT Modes for Avisynth+: [[MT_NICE_FILTER]] |
- Added Y, YV411, YV16 and YV24, 10-16 bits 4:2:0, 4:2:2, 4:4:4, planar RGB(A) 8-16 bits support besides existing YV12 | - Added Y, YV411, YV16 and YV24, 10-16 bits 4:2:0, 4:2:2, 4:4:4, planar RGB(A) 8-16 bits support besides existing YV12 | ||
- (YUY2 support with workaround: internally converted to YV16, process and convert back | - (YUY2 support with workaround: internally converted to YV16, process and convert back | ||
conversion is lossless, but slower than using native YV16) | conversion is lossless, but slower than using native YV16) | ||
− | - New parameters: bool "luma", bool "chroma" (default true) to disable processing of luma/chroma planes | + | - New parameters: bool "luma", bool "chroma" (default true) to disable processing of luma/chroma planes<br> |
v1.1b 2006/11/09 - Changes by tritical. | v1.1b 2006/11/09 - Changes by tritical. | ||
- Fixed assuming previous and next frame pitches were the same as the current frame pitch.<br> | - Fixed assuming previous and next frame pitches were the same as the current frame pitch.<br> | ||
Line 128: | Line 132: | ||
|- | |- | ||
!v1.1b | !v1.1b | ||
− | + | |[http://web.archive.org/web/20070225212908if_/http://bengal.missouri.edu/~kes25c/FluxSmooth-1.1b.zip FluxSmooth-1.1b.zip] | |
− | |[http://web.archive.org/web/ | + | | |
|} | |} | ||
<br> | <br> | ||
Line 136: | Line 140: | ||
*[http://forum.doom9.org/showthread.php?t=38296 Doom9 Forum] - FluxSmooth discussion. | *[http://forum.doom9.org/showthread.php?t=38296 Doom9 Forum] - FluxSmooth discussion. | ||
*[http://forum.doom9.org/showthread.php?t=114051 Doom9 Forum] - FluxSmooth v1.1b discussion. | *[http://forum.doom9.org/showthread.php?t=114051 Doom9 Forum] - FluxSmooth v1.1b discussion. | ||
− | *[http://forum.doom9.org/showthread.php?t=158245 Doom9 Forum] - 64-bit FluxSmooth with [[SSE2]] and [[SSSE3]]. | + | *[http://forum.doom9.org/showthread.php?t=158245 Doom9 Forum] - 64-bit FluxSmooth with [[SSE2]] and [[SSSE3]] (outdated). |
<br> | <br> | ||
<br> | <br> |
Latest revision as of 18:26, 25 June 2020
Abstract | |
---|---|
Author | SansGrip, pinterf |
Version | v1.4 |
Download | FluxSmooth 1.4 |
Category | Spatial-Temporal Denoisers |
License | "There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will" |
Discussion | Doom9 Thread (original) Doom9 Thread (update) |
Contents |
[edit] Description
One of the fundamental properties of noise is that it's random. One of the fundamental properties of motion is that it's not. This is the premise behind FluxSmooth, which examines each pixel and compares it to the corresponding pixel in the previous and last frame. Smoothing occurs if both the previous frame's value and the next frame's value are greater, or if both are less, than the value in the current frame.
I like to call this a "fluctuating" pixel, then I like to wipe that pixel from existence by averaging it with its neighbours. For FluxSmoothST, this is (by default) done in a spatio-temporal manner, in that for each fluctuating pixel its 8 immediate spatial neighbours as well as its 2 temporal neighbours (the above mentioned corresponding pixel from the previous and next frames) are considered for inclusion in the average. If the value of each pixel is within the specified threshold, it is included. If not, it isn't. FluxSmoothT performs only temporal averaging.
[edit] Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Progressive input only
- Supported color formats: YUY2, Y8, YV12, YV16, YV24, YV411
- AviSynth+: All planar formats (8/10/12/14/16-bit, Y, YUV, and RGB) are supported.
- AviSynth+ to enable AVX2 or AVX512 support.
[edit] Limitations
- The very edges of the frame are unprocessed.
- The very first and very last frame of a clip are left unprocessed.
[edit] Syntax and Parameters
- FluxSmoothT (clip, int "temporal_threshold", bool "luma", bool "chroma", int "opt" )
- FluxSmoothST (clip, int "temporal_threshold", int "spatial_threshold", bool "luma", bool "chroma", int "opt" )
- clip =
- Input clip.
- clip =
- int temporal_threshold = 7
- Temporal neighbour pixels within this threshold from the current pixel are included in the average.
- Note on 10+ bits: threshold values are scaled, same values give similar results for all bit depths
- If set to -1, no temporal smoothing occurs. (FluxSmoothT cannot be set to -1)
- int temporal_threshold = 7
- int spatial_threshold = 7
- Spatial neighbour pixels within this threshold from the current pixel are included in the average.
- Note on 10+ bits: threshold values are scaled, same values give similar results for all bit depths
- If set to -1, no spatial smoothing occurs.
- int spatial_threshold = 7
- bool luma = true
- Process luma (Y) channel, default true. Parameter is ignored for RGB clips.
- If set to false, luma is copied.
- bool luma = true
- bool chroma = true
- Process chroma (U, V) channels, default true
- If set to false, chroma channels are copied. Parameter is ignored for RGB clips.
- bool chroma = true
- int opt = -1
- Debug parameter, "opt"-like parameters can disappear or change their meaning at any time later.
- Possible values: opt<0: fastest processor option is automatically chosen
- Other values: 0=plain C; 1=SSE2; 2=SSE4.1; 3=AVX2; 4=AVX512
- int opt = -1
[edit] Examples
FluxSmoothT with default settings:
AviSource("Blah.avi") FluxSmoothT(temporal_threshold=7, luma=true, chroma=true)
FluxSmoothST with default settings:
AviSource("Blah.avi") FluxSmoothST(temporal_threshold=7, spatial_threshold=7, luma=true, chroma=true)
[edit] Changelog
Version Date Changes
v1.4 2019/04/26 - AVX512 support when both AVX512F and AVX512BW extensions are available (e.g. Skylake X and Cannon Lake). Available processor flags can be shown through the .Info() filter in Avisynth+. New value for 'opt': opt=4 means forced AVX512. Error message if system does not support those AVX512 flags. - Moved to Visual Studio 2019 (xp builds: Microsoft C++, main builds: LLVM clang)
v1.3 2019/04/02 - Changes by pinterf - project moved to github: https://github.com/pinterf/FluxSmooth - Built using Visual Studio 2017, additional LLVM 8.0 clang support - Changed to AVS 2.6 plugin interface - x64 build for Avisynth+ - Added version resource to DLL - Removed MMX support, requires SSE2. (Though pure C is still available in the source) - Drop all inline assembly, SIMD intrinsics based on C code, SSE2, SSE4.1 and AVX2 optimizations - Single DLL, optimizations for different CPU instruction sets are chosen automatically. - Reports MT Modes for Avisynth+: MT_NICE_FILTER - Added Y, YV411, YV16 and YV24, 10-16 bits 4:2:0, 4:2:2, 4:4:4, planar RGB(A) 8-16 bits support besides existing YV12 - (YUY2 support with workaround: internally converted to YV16, process and convert back conversion is lossless, but slower than using native YV16) - New parameters: bool "luma", bool "chroma" (default true) to disable processing of luma/chroma planes
v1.1b 2006/11/09 - Changes by tritical. - Fixed assuming previous and next frame pitches were the same as the current frame pitch.
v1.1a 2004/07/29 - Yet another "oops" release. - Current pixel is once again considered in the averaging code -- I found the lack of it too aggressive, especially during fast motion. - Also fixed stupid "3am bug" involving a couple of variables I'd declared static that shouldn't have been. - Thanks to krieger2005 for spotting that one, and ARDA for diagnosing it.
v1.1 2003/07/26 - Changed the averaging code so that the current pixel is excluded, which produces better noise reduction. - Also split the code into two different filters, FluxSmoothT and FluxSmoothST. - FluxSmoothT does temporal-only smoothing (equivalent to setting "spatial_threshold=-1" in FluxSmoothST) and is about 50% faster. - Removed Avisynth 2.0x version to tidy up the code base. Does anyone actually use it any more? - My thanks to fabrice and sh0dan for the 1.01 release during my extended absence :).
v1.01 2003/??/?? - Added by sh0dan: - Removed leak in AviSynth 2.5 YV12 mode (code by fabrice) - Aligned tables and variables. - Use AviSynth BitBlt for copying chroma. - Don't use streaming store. (movntq) - All in all an approximate 15% speedup compared to previous version. - All changes are marked with "sh0:".
v1.0 2003/01/08 - First "stable" release. I think it's been tested enough, but wait for a bunch of bugs to emerge and make me a liar... - Fixed a bug that, in conjunction with a bug in the built-in resizers, caused an access violation under certain circumstances. Thanks to sh0dan for spotting that one :). - Added "SetCacheHints" and upgraded to "AvisynthPluginInit2" in 2.5 version.
v0.4 2002/12/16 - Implemented iSSE-optimized version, which runs roughly double the speed of the C++ version. - Some small optimizations to C++ version. - Now smooths chroma as well as luma.
v0.3 2002/11/19 - Fixed bad bug that caused incorrect smoothing: no more in-place filtering. - Changed defaults back to what they were, now that the algorithm works correctly. - Spent some time benchmarking and tweaking various pieces of code, so should now be significantly faster.
v0.2 2002/11/16 - Fixed non-fatal bug that caused a request for one frame beyond the end of the clip. - Changed to in-place filtering so could squeeze a few optimizations here and there. - Changed too-high defaults. - First AviSynth 2.5/YV12 release.
v0.1 2002/11/16 - First release; alpha code.
[edit] Archived Downloads
Version | Download | Mirror |
---|---|---|
v1.1b | FluxSmooth-1.1b.zip |
[edit] External Links
- Doom9 Forum - FluxSmooth v1.3 discussion
- Doom9 Forum - FluxSmooth discussion.
- Doom9 Forum - FluxSmooth v1.1b discussion.
- Doom9 Forum - 64-bit FluxSmooth with SSE2 and SSSE3 (outdated).
Back to External Filters ←