SmoothUV2

From Avisynth wiki
Revision as of 01:34, 16 June 2021 by Reel.Deal (Talk | contribs)

Jump to: navigation, search
Abstract
Author dubhater, asd-g
Version v4.1.0
Download SmoothUV2-2.1.1.7z
Category Spatial Denoisers
License GPLv2
Discussion

Contents

Description

SmoothUV2 is a modern replacement for the old SmoothUV plugin. It includes two filters:

  • SSHiQ2 - a general purpose spatial denoising filter.
  • SmoothUV2 - a spatial derainbow filter.


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.


Requirements


*** 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, bool "HQY", bool "HQC", int "interlaced")


clip   =
A clip to process. It must be in YUV 8..16-bit planar format and must have at least three planes.


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.
Default: rY = 5; rC = 3.


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.
Default: tY = 20; tC =30.


int  str = 240
Strength 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.
Default: 240.


bool  HQY = true
bool  HQC = true
Enables HiQ mode.
Edge processing strength gets automatically reduced.
Default: HQY = HQC = 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.
Default: -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")


clip   =
A clip to process. It must be in YUV 8..16-bit planar format and must have at least three planes.


int  radius = 3
Radius. Must be between 1 and 7.
Larger values smooth more.
Default: 3


int  threshold = 270
Threshold. Must be between 0 and 450.
Larger values smooth more.
Default: 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.
Default: -1.


Examples

SSHiQ2 with default settings:

AviSource("Blah.avi")
SSSHiQ2(rY=5, rC=3, tY=20, tC=30, str=240, HQY=true, HQC=true, interlaced=-1)

SmoothUV2 with default settings:

AviSource("Blah.avi")
SmoothUV2(radius=3, threshold=270, interlaced=-1)


Changelog

Version      Date            Changes
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

Personal tools