Skip to main content

Bilateral filter for VapourSynth

Project description

VapourSynth-BilateralGPU

Copyright© 2021 WolframRhodium

Bilateral filter in CUDA for VapourSynth.

Description

Bilateral filter is a non-linear, edge-preserving and noise-reducing smoothing filter for images.

The intensity value at each pixel in an image is replaced by a weighted average of intensity values from nearby pixels. This weight can be based on a Gaussian distribution.

Special thanks to Kice for doing most of the work in previous implementation.

Requirements

  • CPU with AVX2 support.

  • CUDA-enabled GPU(s) of compute capability 5.0 or higher (Maxwell+).

  • GPU driver >= v452.39 for GeForce or bilateral_rtc users or >= v496.13 in general.

The plugin can run on older generation of GPUs or CPU without AVX2 support by manual compilation.

The _rtc version requires compute capability 3.5 or higher, GPU driver 465 or newer and has dependencies on nvrtc64_112_0.dll/libnvrtc.so.11.2 and nvrtc-builtins64_114.dll/libnvrtc-builtins.so.11.4.50.

Supported Formats

sample type: 8-16 bit integer or 32 bit float Gray/YUV/RGB input

Usage

core.{bilateralgpu, bilateralgpu_rtc}.Bilateral(clip clip, float[] sigma_spatial=3.0, float[] sigma_color=0.02, int[] radius=0, int device_id=0, int num_streams=4, bool use_shared_memory=True)
  • clip: The input clip.

  • sigma_spatial: (Default: 3.0) Filter sigma in the coordinate space. Use an array to assign it for each plane. If "sigma_spatial" for the second plane is not specified, it will be set according to the sigma_spatial of first plane and sub-sampling.

  • sigma_color: (Default: 0.02) Filter sigma in the color space. Use an array to assign it for each plane, otherwise the same sigma_color is used for all the planes. It will be normalized internally, so that for clips with different bit depths, the same values get similar results.

  • radius: (Default: 0) Kernel window size. 0 = automatic calculatation based on "sigma_spatial".

  • device_id: (Default: 0) CUDA device ID.

  • num_streams: (Default: 4) Number of CUDA streams, enables concurrent kernel execution and data transfer.

  • use_shared_memory: (Default: True) Use on-chip memory to reduce bandwidth requirements on memory operations.

  • The _rtc version has two experimental parameters:

    • block_x, block_y: (Default: 16, 8) Block size of launch configuration of the kernel. Don't modify it unless you know what you are doing.

Compilation

cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D CMAKE_CUDA_FLAGS="--threads 0 --use_fast_math -Wno-deprecated-gpu-targets" -D CMAKE_CUDA_ARCHITECTURES="50;61-real;75-real;86"

cmake --build build --config Release

Project details


Release history Release notifications | RSS feed

This version

14

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl (39.0 MB view details)

Uploaded Python 3Windows x86-64

vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl (49.1 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

File details

Details for the file vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 23d284bb8609d4ab64ed2508f75f6e47e7eb5a14aef558173f5b0d610be8eadd
MD5 8aa23cd7cd05a0ca9fed18e8b3f2bc2e
BLAKE2b-256 a92cebd80580c1e41676c8818b3c6bee50c450d3159d5a079866da10abb0a9e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl:

Publisher: publish.yml on WolframRhodium/VapourSynth-BilateralGPU

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c0f9f8d59d60d0f240eaf700958e2504921996f85c0aac3aaaf61a0d8ccb8612
MD5 de8077cd8b388e077a3375cb2d736e86
BLAKE2b-256 27fc4fcf8521d248631691289b034b32969a8421e69c36295739b3817f0aa75b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl:

Publisher: publish.yml on WolframRhodium/VapourSynth-BilateralGPU

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page