SmoothUV2
From Avisynth wiki
Abstract | |
---|---|
Author | dubhater, asd-g |
Version | v4.4.0 |
Download | SmoothUV2 |
Category | Spatial Denoisers |
License | GPLv2 |
Discussion |
Contents |
Description
SmoothUV2 is a modern replacement for the old SmoothUV plugin. It includes two filters:
Key differences to the original SmoothUV:
- Filters renamed to SSHiQ2 and SmoothUV2.
-
"fields"
parameter renamed to"interlaced"
and changed from a boolean to an integer. - Additional colorspace support, including HBD.
- x64 bit version.
- Version 4.2.0; dropped support for AviSynth 2.6.
Requirements
- [x86]: AviSynth+
- [x64]: AviSynth+
- Supported color formats: YV12, YV16, YV24
- AviSynth+: all planar YUV formats (8/10/12/14/16-bit, with or without alpha channel) are supported.
- *** vc_redist.x86.exe is required for SmoothUV2-x86
- *** vc_redist.x64.exe is required for SmoothUV2-x64
Syntax and Parameters
SSHiQ2
A general purpose spatial denoiser. SSHiQ has independent parameters for both luma and chroma, meaning that you can process the luma only and leave the chroma intact or vice versa.
- SSHiQ2 (clip, int "rY", int "rC", int "tY", int "tC", int "strY", int "strC", bool "HQY", bool "HQC", int "interlaced", int "opt", int "dither")
- clip =
- A clip to process. It must be in YUV 8..16-bit planar format and must have at least three planes.
- clip =
- int rY = 5
- int rC = 3
- Radius respectively for luma and chroma planes.
- Controls how far from the current pixel neighbors are used.
- rY Must be between 1 and 7.
- rC Must be between 1 and 7 for 4:2:0 subsampling and between 1 and 3 for 4:2:2/4:4:4 subsampling.
- Larger values smooth more.
- int rY = 5
- int tY = 20
- int tC = 30
- Threshold respectively for luma and chroma planes.
- Must be between 0 and 450.
- Set to 0 for copying the plane.
- Larger values smooth more.
- int tY = 20
- int strY = 240
- int strC = strY
- Strength respectively for luma and chroma planes.
- It is only used for HiQ mode and it controls how much of the smoothed version should be used at best for calculating the new pixel.
- Must be between 0 and 255.
- int strY = 240
- bool HQY = true
- bool HQC = true
- Enables HiQ mode.
- Edge processing strength gets automatically reduced.
- bool HQY = true
- int interlaced = -1
- Whether the frame is interlaced.
- -1 : If frame properties are supported and frame property "_FieldBased" exists - "_FieldBased" value is used.
- If frame properties aren't supported or there is no property "_FieldBased" - 0.
- 0 : Progressive frame.
- 1 : Interlaced frame.
- int interlaced = -1
- int opt = -1
- Sets which cpu optimizations to use.
- -1 : Auto-detect.
- 0 : Use C++ code.
- 1 : Use SSE2 code.
- 2 : Use SSSE3 code.
- 3 : Use SSE4.1 code.
- 4 : Use AVX2 code.
- 5 : Use AVX-512 code.
- Sets which cpu optimizations to use.
- int opt = -1
- int dither = -1
- How to convert the internal 16-bit calculation to the clip depth (when clip depth < 16-bit).
- -1 : Rounding.
- 0 : Ordered dither.
- 1 : Error diffusion (Floyd-Steinberg).
- How to convert the internal 16-bit calculation to the clip depth (when clip depth < 16-bit).
- int dither = -1
SmoothUV2
This filter performs structure-preserving smoothing (blurring) on the U/V (chrominance or colour) information of the image, leaving Y (luminance) intact. It was created in an attempt to reduce the appearance of "rainbows" (cross-colour artifacts) near lines in some cel animation.
- SmoothUV2 (clip, int "radius", int "threshold", int "interlaced", int "opt", int "dither")
- clip =
- A clip to process. It must be in YUV 8..16-bit planar format and must have at least three planes.
- clip =
- int radius = 3
- Must be between 1 and 7 for 4:2:0 subsampling and between 1 and 3 for 4:2:2/4:4:4 subsampling.
- Larger values smooth more.
- int radius = 3
- int threshold = 270
- Threshold. Must be between 0 and 450.
- Larger values smooth more.
- int threshold = 270
- int interlaced = -1
- Whether the frame is interlaced.
- -1 : If frame properties are supported and frame property "_FieldBased" exists - "_FieldBased" value is used.
- If frame properties aren't supported or there is no property "_FieldBased" - 0.
- 0 : Progressive frame.
- 1 : Interlaced frame.
- int interlaced = -1
- int opt = -1
- Sets which cpu optimizations to use.
- -1 : Auto-detect.
- 0 : Use C++ code.
- 1 : Use SSE2 code.
- 2 : Use SSSE3 code.
- 3 : Use SSE4.1 code.
- 4 : Use AVX2 code.
- 5 : Use AVX-512 code.
- Sets which cpu optimizations to use.
- int opt = -1
- int dither = -1
- How to convert the internal 16-bit calculation to the clip depth (when clip depth < 16-bit).
- -1 : Rounding.
- 0 : Ordered dither.
- 1 : Error diffusion (Floyd-Steinberg).
- How to convert the internal 16-bit calculation to the clip depth (when clip depth < 16-bit).
- int dither = -1
Examples
SSHiQ2 with default settings:
AviSource("Blah.avi") SSSHiQ2(rY=5, rC=3, tY=20, tC=30, strY=240, strC=240, HQY=true, HQC=true, interlaced=-1, opt=-1, dither=-1)
SmoothUV2 with default settings:
AviSource("Blah.avi") SmoothUV2(radius=3, threshold=270, interlaced=-1, opt=-1, dither=-1)
Changelog
Version Date Changes
v4.4.0 2021/08/10 - Added AVX2 and AVX512 code.
v4.3.0 2021/07/04 - Added SSE2 code. - Parameter str replaced by strY and strC.
v4.2.1 2021/06/29 - Improved speed for opt=0.
v4.2.0 2021/06/24 - Added C++ code. - Added parameters opt and dither. - Changed internal calculation to 16-bit. - Dropped support for AviSynth 2.x.
v4.1.0 2021/06/08 - SmoothUV2 threshold changed back to 0..450 range. - A bit improved calculation for 8-bit. - Added SSHiQ2 function: updated version of SSHiQ from SmoothUV v1.4.0: * replaced MMX asm code with SSE4.1 intrinsics; * fixed planes shift; * added support for 10..16-bit; * added support for 422/444 chroma subsampling; * more precise 8-bit calculation.
v4.0.0 2021/04/29 - Function name changed to SmoothUV2. - Fixed horizontal planes shift. - Fixed vertical planes shift for interlaced frames. - Fixed output for 422/444 subsampling. - Additional limit radius for 422/444.
v3.0.1 2021/04/27 - Another attempt to fix last columns processing. - Removed redundant interlaced value 2.
v3.0.0 2021/04/25 - Fixed not processed edges. - Added support for 10..16-bit. - Set MT mode: MT_NICE_FILTER. - Changed the range of parameter threshold from 0..450 to 0..255. - Changed the type of parameter interlaced from bool to int. - Changed the minimum CPU instructions support from SSE2 to SSE4.1. - Added Linux building option.
v2.1.1 2020/06/03 - Fixed memory misalignment for AviSynth 2.6. - Fixed processing when interlaced and h % 2.
v2.1.0 2020/05/17 - Move project to GitHub - Update to AviSynth+'s v8 interface - Rename files to SmoothUV2
2019/04/02 - Backport SmoothUV from VapourSynth port by Dubhater - Add YV16 and YV24 support - x64 version - Compiled with Microsoft Visual Studio C++ 2019 - Author: Asd
External Links
- GitHub - Source code repository.
Back to External Filters ←