Vapoursynth HaloBuster
HaloBuster removes halos by denoising a luma copy hard with NLMeans and keeping that copy only along edges. A limiter then keeps the result close to the source.
Filtering → Vapoursynth → DeHalo

What it does
The luma is padded and filtered with spatial NLMeans (1×1 patch, large search window). An edge mask from the denoised copy decides where the denoised picture replaces the source; then a limiter caps how far the result may move away from the unfiltered luma, and the padding is removed. Chroma passes through untouched.
Settings
| Control | Parameter | Range / values | Hybrid default | Meaning |
|---|---|---|---|---|
| Search radius | a | 1 – 64 | 32 | NLMeans search radius, also the padding added on every side; larger is slower. |
| Strength | h | 0.1 – 50.0 | 6.4 | NLMeans strength; the denoised copy is used for the halo mask and is also what is merged back. Higher flattens the halo harder. |
| Threshold | thr | 0.1 – 64.0 | 1.0 | Limiter threshold (8-bit scale): differences below it keep the full filtering. The useful band is narrow; above about 8 the limiter hardly does anything. |
| Elasticity | elast | 1.0 – 10.0 | 1.5 | Soft ramp: full filtering up to the threshold, fading to the source up to threshold × elasticity; 1.0 is a hard switch. |
| Tools: Expr | tools | akarin, cranexpr, std | akarin (std without AVX2) | Expression evaluator. |
| Tools: NLMeans | tools | knlm, vszip, nlm_ispc, knlmvk, vszipcl, vszipcu | knlm (vszip without OpenCL) | NLMeans implementation: OpenCL (knlm, vszipcl), Vulkan (knlmvk), CUDA (vszipcu) or CPU (vszip, nlm_ispc). GPU choices get a device setting. |
| Tools: TCanny | tools | tcanny, std | tcanny | Edge mask; std uses a box blur plus a Sobel mask instead. |
| Tools: BoxBlur | tools | vszip, std | vszip | Box blur; only used with TCanny = std. |
| Tools: EdgeMasks | tools | edgemasks, std | edgemasks | Sobel mask; only used with TCanny = std. |
Example
Default settings on a 10-bit YUV 4:2:0 source (640x356):
# adjusting color space from YUV420P10 to YUV444P16 for vsHaloBuster
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16)
# halo removal using HaloBuster
clip = fromDoom9.HaloBuster(clip, tools={'expr': 'akarin', 'nlmeans': 'knlm', 'boxblur': 'vszip', 'edgemasks': 'std', 'tcanny': 'tcanny'})
How Hybrid calls it
- HaloBuster works on 8-bit and 16-bit YUV clips (the filtered luma is put back onto the original chroma, which needs the same bit depth); other formats, for example 10 or 12 bit, are converted first.
- Values are only written when they differ from the defaults; the Tools selection is always written.
- The threshold is entered on the 8-bit scale; the script scales it to the clip's bit depth. The other settings do not depend on the bit depth.
- HaloBuster also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).
Background
The script
HaloBuster comes from an AviSynth script posted on the Doom9 forum. The original ran KNLMeansCL on stacked high-bit-depth input and limited the result with slimit_dif; the VapourSynth port reproduces that limiter with a threshold and an elasticity ramp. With the default search radius of 32 NLMeans is slow, especially on the CPU.
Sources
- VapoursynthScriptsInHybrid (the script collection Hybrid uses)
- Hybrid's tooltips