Avisynth DeathRay
DeathRay is a non-local means denoiser that runs on the graphics card through OpenCL. It can work on a single frame or on several neighbouring frames.
Filtering → Avisynth → DeNoise

What it does
Every pixel is replaced by a weighted average of pixels whose surroundings look similar. Because similarity is judged on small patches and not on single pixels, noise is removed while repeating texture and edges survive. With a temporal radius above 0 the search also covers the previous and next frames. Luma and chroma have their own strength and temporal radius, a strength of 0 leaves the plane untouched.
Requirements
- A graphics card and driver with OpenCL support (OpenCL, not CUDA). The plugin does not work on very old cards, for example ATI 4000-series and older.
- Windows, 64 bit.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Luma strength | hY | 0–10 | 1 | Denoising strength for luma; 0 = luma untouched. |
| Luma radius | tY | 0–64 | 0 | Temporal radius for luma. 0 = spatial only, 1 = previous, current and next frame, higher values reach further. |
| Sigma | s | 0.1–10 | 1 | Sigma of the Gaussian weights inside the 7×7 kernel. Above about 1 the weights become nearly equal, which blurs more. |
| Chroma strength | hUV | 0–10 | 1 | Denoising strength for chroma; 0 = chroma untouched. |
| Chroma radius | tUV | 0–64 | 0 | Temporal radius for chroma. |
| Sampling factor | x | 1–14 | 1 | Size of the search windows: 1 = 7×7, 2 = 13×13, 3 = 19×19, 4 = 25×25. Values of 2 and higher with strong settings can show a visible 32×32 tile grid. |
| Reduce target pixel | z | on/off | off | The target pixel gets the minimum instead of the maximum of the other weights. Filtering is more even from shadows to highlights. |
| Correction | c | on/off | on | Post-correction that limits the filtering per pixel. Off gives plain non-local means. |
| Linear luma | l | on/off | off | Processes luma in linear light instead of gamma-encoded. |
| Balanced | b | on/off | off | Balances the weighting by luma; not applied to chroma. |
Example
Default settings on a 10-bit YUV 4:2:0 source (Hybrid converts to 8 bit for the plugin and back):
# Converting from 10 to 8bit for Deathray ConvertBits(8) Deathray() # Converting from 8 to 10bit for encoder ConvertBits(10)
How Hybrid calls it
- Hybrid loads Deathray.dll and calls
Deathray. Parameters are only written when they differ from the plugin defaults, so default settings give a plainDeathray(). - The plugin processes 8-bit planar YUV (YV12, YV16, YV24). Other bit depths and formats are converted before the filter and back afterwards.
- The plugin is not thread safe, so Hybrid switches the script to single-threaded mode while this filter is used.
- DeathRay also offers the common options and can be added to the filter queue several times.
Background
- DeathRay was written by Jawed Ashraf; the last version listed in the Doom9 thread is 1.04.
- The plugin does not limit the strength values to 10; Hybrid offers 0–10.
- "Deathray2" is a different, 32-bit only project.
See also: KNLMeansCL
Sources
- Deathray on GitHub (readme)
- Doom9: Deathray thread
- Hybrid's tooltips
- The AviSynth+ documentation does not cover DeathRay.