EEDI2CUDA

From Avisynth wiki
Revision as of 04:47, 24 August 2021 by Reel.Deal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Abstract
Author misakikasumi, WolframRhodium
Version 2b35113
Download x86: EEDI2CUDA (x86).zip

x64: EEDI2CUDA.zip

Category Denoisers
License GPLv2
Discussion

Contents

Description

EEDI2 filter using CUDA. EEDI2CUDA includes 3 functions:

  • EEDI2_CUDA: deinterlace
  • EEDI2_CUDA_AA2: anti-aliasing
  • EEDI2_CUDA_Enlarge2: upscale by 2


Requirements

  • [x86] / [x64]: AviSynth+
  • Supported color formats: all planar 8-16bit Y/YUV/RGB
  • CUDA-enabled GPU(s) of compute capability 5.0 or higher (Maxwell+).
  • GPU driver 450 or newer.


Syntax and Parameters

EEDI2_CUDA (clip, int field, int "mthresh", int "lthresh", int "vthresh", int "estr", int "dstr", int "maxd", int "field", int "map", int "nt", int "pp", int "num_streams", int "device_id")

EEDI2_CUDA_AA2 (clip, int "mthresh", int "lthresh", int "vthresh", int "estr", int "dstr", int "maxd", int "field", int "map", int "nt", int "pp", int "num_streams", int "device_id")

EEDI2_CUDA_Enlarge2 (clip, int "mthresh", int "lthresh", int "vthresh", int "estr", int "dstr", int "maxd", int "field", int "map", int "nt", int "pp", int "num_streams", int "device_id")

clip   =
Input clip to process. It must be in 8..16-bit planar format with or without alpha.


int   =
field: Controls which field in the resized image the original image will be copied to.
  • 0 = bottom field
  • 1 = top field
  • 2 = alternates each frame, starts with bottom
  • 3 = alternates each frame, starts with top


int  mthresh = 10
int  lthresh = 20
int  vthresh = 20
These all control edge detection used for building the initial edge map.
  • mthresh is the edge magnitude threshold... its range is from 0 to 255, lower values will detect weaker edges.
  • lthresh is the laplacian threshold... its range is 0 to 510, lower values will detect weaker lines.
  • vthresh is the variance threshold... its range is 0 to a large number, lower values will detect weaker edges.
Use the "map" option to tweak these settings as needed.


int  estr = 2
int  dstr = 4
These are used for dilation and erosion of the edge map.
  • estr sets the required number of edge pixels (<=) in a 3x3 area, in which the center pixel has been detected as an edge pixel, for the center pixel to be removed from the edge map.
  • dstr sets the required number of edge pixels (>=) in a 3x3 area, in which the center pixel has not been detected as an edge pixel, for the center pixel to be added to the edge map.
Use the "map" option to tweak these settings as needed.


int  maxd = 24
Sets the maximum pixel search distance for determining the interpolation direction.
Larger values will be able to connect edges and lines of smaller slope but can lead to artifacts. Sometimes using a smaller maxd will give better results than a larger setting. The maximum possible value for maxd is 29.


int  map = 0
Allows one of three possible maps to be shown. Possible settings:
  • 0 - no map
  • 1 - edge map (edge pixels will be set to 255 and non-edge pixels will be set to 0.)
  • 2 - original scale direction map
  • 3 - 2x scale direction map


int  nt = 50
Defines a noise threshold between pixels in the sliding vectors, this is used to set initial starting values.
Lower values should reduce artifacts but sacrifice edge reconstruction... while higher values should improve edge reconstruction but lead to more artifacts. The possible range of values is 0 to 256.


int  pp = 1
Only pp=1 is implemented.
  • 1 - check for spatial consistency of final interpolation directions


int  num_streams = 1
Specify the number of CUDA streams. A larger value increases the concurrency and also increases the GPU memory usage. The default value num_streams=1 is already fast enough.


int  device_id = -1
Set the GPU device ID to use. You must specify this argument for each call if you have multiple GPUs.



Examples

TODO

Changelog

Version      Date            Changes
2b35113 2021/08/16 - x86 build dec6f26 2021/08/16 - Initial release


External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools