FFT3DGPU

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(FFT3DGPU: add documentation (WIP))
m (Syntax and Parameters: typos)
Line 81: Line 81:
 
<br>
 
<br>
 
::{{Par2|degrid|float|1.0}}
 
::{{Par2|degrid|float|1.0}}
:::Enables degriding. Only works well with <mode>mode=1</mode>. Doesn't degrid the Kalman filter (but it does degrid the sharpening (if enabled) after kalman filter). default 1.0 for <mode>mode=1</mode>, 0.0 for <mode>mode=0</mode> or 2.
+
:::Enables degriding. Only works well with <code>mode=1</code>. Doesn't degrid the Kalman filter (but it does degrid the sharpening (if enabled) after kalman filter). default 1.0 for <code>mode=1</code>, 0.0 for <code>mode=0</code> or 2.
 
<br>
 
<br>
 
::{{Par2|scutoff|float|0.3}}
 
::{{Par2|scutoff|float|0.3}}
Line 98: Line 98:
 
::{{Par2|ow|int|bw/2}}
 
::{{Par2|ow|int|bw/2}}
 
::{{Par2|oh|int|bh/2}}
 
::{{Par2|oh|int|bh/2}}
:::Overlap width and height. This only works with <code>mode=1</code>. This specifies how big the overlap between the blocks are. Overlap size must be less than or equal to half the blocksize. <code>Ow<c/ode> must be even.
+
:::Overlap width and height. This only works with <code>mode=1</code>. This specifies how big the overlap between the blocks are. Overlap size must be less than or equal to half the blocksize. <code>ow</code> must be even.
 
<br>
 
<br>
 
::{{Par2|wintype|int|0}}
 
::{{Par2|wintype|int|0}}

Revision as of 02:12, 25 March 2020

Abstract
Author tsp, pinterf
Version v0.8.4
Download FFT3dGPU-v0.8.4-pfmod.7z
Category Denoisers
License GPLv2
Discussion Doom9 Forum (original)

Contents

Description

FFT3dGPU is a GPU version of Fizick's FFT3DFilter. The algorithm (Fast Fourier Transform, denoising) is the same for the most part. Currently the following is not implemented: support for noise pattern.

In this version the next frame is processed while waiting for the GPU to end it's work. Meaning the filters before fft3dGPU are working concurrently with it. The filter is not MT-friendly, from v0.8.4 automatically registers itself as MT_SERIALIZED for AviSynth+.

Requirements


Syntax and Parameters

FFT3DGPU (clip, float "sigma", float "beta", int "bw", int "bh", int "bt", float "sharpen", int "plane", int "mode", int "bordersize", int "precision", bool "NVPerf", float "degrid", float "scutoff", float "svr", float "smin", float "smax", float "kratio", int "ow", int "oh", int "wintype" , int "interlaced", float "sigma2", float "sigma3", float "sigma4", bool "oldfft")


clip   =
Input clip


float  sigma = 2.0
Given noise value for all (or highest) frequencies. Only values greater that 0.0


float  beta = 1.0
Noise margin (float>=1.0, default=1.0 for no noise left): control noise amount left in the restoration for Wiener filter, so max filter noise attenuation = (beta-1)/beta.


int  bw = 32
int  bh = 32
Block width and height. It should be a power of 2 ie valid values is 4,8,16,32,64,128,256,512 (note that bw should be greater than 4 for best result).


int  bt = 3
Block temporal size, number of frames.
  • -1 : sharpen only (2D)
  • 0 : all previous frames (switch Kalman filter mode)
  • 1 : only current frame (spatial 2D Wiener filter)
  • 2 : previous and current frame (3D Wiener filter)
  • 3 : previous, current and next frame (3D Wiener filter)
  • 4 : two previous, current and next frame (3D Wiener filter)


float  sharpen = 0.0
Sharpening strength, positive values sharpens the image, negative values blurs the image. 0 disables sharpening.


int  plane = 0
Processed color plane:
  • 0 : luma(Y)
  • 1 : chroma U
  • 2 : chroma V
  • 3 : chroma planes U and V
  • 4 : both luma and chroma
For a greyscale clip. 4 means luma (the only plane), 1,2 and 3 gives error message.
For RGB clips (planar RGB only!) operation is always 4=all planes, regardless of this parameter.


int  mode = 1
Processing mode:
  • 0 : only overlaps 1:1. This is faster but produces artifacts with high sigma values.
  • 1 : block overlaps 2:1. This is slower but produces fewer artifacts.
  • 2 : again 1:1 overlap but with a additional border. This reduces border artifacts seen with mode=0.
The speed is between mode 0 and 1. Kalman(bt=0) works well with mode=0.


int  bordersize = 1
Only used with <mode>mode</mode> 2. Defines the size of the border.


int  precision = 0
  • 0 : to use 16 bit floats(half precision).
  • 1 : to use 32 bit float(single precision) for the fft and 16 bit float for the wienner/kalman and sharpening.
  • 2 : always use 32 bit floats.
Using 16 bit float increases the performance but reduces precision. With a Geforce 7800GT precision=0 is ~1.5 times faster than than mode 2.


bool  NVPerf = false
Enables support for NVPerfHUD (http://developer.nvidia.com/object/nvperfhud_home.html).


float  degrid = 1.0
Enables degriding. Only works well with mode=1. Doesn't degrid the Kalman filter (but it does degrid the sharpening (if enabled) after kalman filter). default 1.0 for mode=1, 0.0 for mode=0 or 2.


float  scutoff = 0.3
Sharpening cutoff frequency, relative to max.


float  svr = 1.0
Sharpening (and dehalo) vertical ratio (to horizontal) (default=1.0 - same as horizontal, 0 - no vertical sharpening)


float  smin = 4.0
float  smin = 20.0
Minimum and maximum limit (approximate noise margin) for sharpening stage.


float  kratio = 2.0
Ratio of threshold to sigma to reset Kalman filter. Variation threshold = sigma*kratio, good value is about from 1.5 to 3.0


int  ow = bw/2
int  oh = bh/2
Overlap width and height. This only works with mode=1. This specifies how big the overlap between the blocks are. Overlap size must be less than or equal to half the blocksize. ow must be even.


int  wintype = 0
weighting windows type:
  • 0 : same analysis and synthesis half-cosine window, used in all versions before 1.4.
  • 1 : intermediate between 0 and 2
  • 2 : flat analysis window, rised cosine (Hanning) synthesis window.


bool  interlaced = false
Set to true for separate filtering for each field.


float  singma2 = sigma
float  singma3 = sigma
float  singma4 = sigma
Given noise value at second, third, and lowest scale level frequencies. Only values greater that 0.0


bool  oldfft = false
Set to true to use the old fftcode (used in version 0.6.2 and lower) false to use new fft code. If not defined fft3dgpu will use the fastest code.


bool  pframe = false
Noise pattern frame number.


int  px = 0
int  py = 0
Noise pattern block horizontal X position and vertical Y position. If px=py=0, then the pattern block is defined automatically with minimal power spectral density.


bool  pshow = false
Show noise pattern block and its properties.


float  pcutoff = 0.1
Noise pattern cutoff frequency (relative to max).


float  pfactor = 0.0
Noise pattern denoise strength (0 to 1.0, default=0, this method disabled).


float  dehalo = 0.0
Halo removal strength. Only values greater that 0.0


float  hr = 2.0
Halo approximate radius. Only values greater that 0.0


float  ht = 50.0
Halo approximate threshold. Only values greater that 0.0


int  ncpu = 1
Max number of CPU threads to use for FFT calculation.


Changelog

Version      Date            Changes
v2.1.1 2006/08/24 - Last release by tsp, see included docs for full changelog





Back to External Filters

Personal tools