Skip to content

Post Processing Filters

Rainman74 edited this page Sep 18, 2025 · 1 revision

Post-Processing Filters (KFM.dll)

KTemporalNR(clip, int "dist", float "thresh")

Temporal averaging filter

  • CUDA: Yes
  • clip – Source clip
  • int dist = 3 – Maximum reference frame distance. Number of reference frames, including the source frame, is dist * 2 + 1.
  • float thresh = 1 ※ – Threshold for pixels to include in averaging. With 1, only pixels equal to source ±1 are averaged.

KDeband(clip, int "range", float "thresh", int "sample", bool "blur_first")

Port of AviUtl’s debanding filter

  • CUDA: Yes
  • clip – Source clip
  • int range = 25 – Corresponds to original range
  • float thresh = 1 ※ – Corresponds to original Y/Cb/Cr thresholds (single value for all). Values are specified in 8‑bit pixel units (no original scaling). For 8‑bit sources, 1 usually works well.
  • int sample = 1 – Corresponds to original sample
  • bool blur_first = false – Corresponds to original “apply blur first”

KEdgeLevel(clip, int "str", float "thrs", int "repair", bool "uv", bool "show")

Port of AviUtl’s edge level adjustment

  • CUDA: Yes
  • clip – Source clip
  • int str = 10 – Equivalent to original “strength”
  • float thrs = 10 ※ – Equivalent to original “threshold”. Scale is in 8‑bit pixel units, so original 25 ≈ 10 here.
  • int repair = 00: same as original. >0: new algorithm.
    • New algorithm: apply the edge‑level filter (repair + 1) / 2 times, and apply a Repair(mode=3)‑like operation repair times. The edge‑level filter is modified to apply only mellow edges from the target pixel.
  • bool uv = falsefalse: same as original; true: also process chroma
  • bool show = false – Output edge map. If repair>0, shows the edges detected in the last filter application among the (repair + 1) / 2 passes. (CUDA unsupported)

※ Values based on 8‑bit are automatically scaled for higher bit depths. Since the type is float, fractional values are valid.

Clone this wiki locally