Skip to main content

Descale

Video/Image filter to undo upscaling.

This fork only supports VapourSynth, none of the new options are mapped in AviSynth. PRs to add AviSynth support are welcome, but apart from that the AviSynth plugin can be considered frozen.

Usage

The VapourSynth plugin itself supports every constant input format. If the format is subsampled, left-aligned chroma planes are always assumed.

descale.Debilinear(clip src, int width, int height, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Debicubic(clip src, int width, int height, float b=0.0, float c=0.5, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Delanczos(clip src, int width, int height, int taps=3, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Despline16(clip src, int width, int height, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Despline36(clip src, int width, int height, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Despline64(clip src, int width, int height, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Depoint(clip src, int width, int height, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

descale.Decustom(clip src, int width, int height, func custom_kernel, int taps=3, float blur=1.0, float[] post_conv=[], float src_left=0.0, float src_top=0.0, float src_width=width, float src_height=height, int border_handling=0, clip ignore_mask=None, bool force=false, bool force_h=false, bool force_v=false, int opt=0)

The border_handling argument can take the following values:

  • 0: Assume the image was resized with mirror padding
  • 1: Assume the image was resized with zero padding
  • 2: Assume the image was resized with extend padding, where the outermost row was extended infinitely far

The opt argument can take the following values:

  • 0: Automatically decide based on CPU capabilities
  • 1: No SIMD instructions
  • 2: Use AVX2

The AviSynth+ plugin is used similarly, but without the descale namespace. Custom kernels and ignore masks are only supported in the VapourSynth plugin.

Custom kernels

# Debilinear
core.descale.Decustom(src, w, h, custom_kernel=lambda x: 1.0 - x, taps=1)

# Delanczos
import math
def sinc(x):
    return 1.0 if x == 0 else math.sin(x * math.pi) / (x * math.pi)
taps = 3
core.descale.Decustom(src, w, h, custom_kernel=lambda x: sinc(x) * sinc(x / taps), taps=taps)

How does this work?

Resampling can be described as A x = b.

A is an n x m matrix with m being the input dimension and n the output dimension. x is the original vector with m elements, b is the vector after resampling with n elements. We want to solve this equation for x.

To do this, we extend the equation with the transpose of A: A' A x = A' b.

A' A is now a banded symmetrical m x m matrix and A' b is a vector with m elements.

This enables us to use LDLT decomposition on A' A to get LD L' = A' A. LD and L are both triangular matrices.

Then we solve LD y = A' b with forward substitution, and finally L' x = y with back substitution.

We now have the original vector x.

Installation

Pre-compiled wheels are available on PyPI for:

  • Windows: x86_64
  • Linux: x86_64 and aarch64 (glibc & musl)
  • macOS: x86_64 (10.13+) and arm64 (11.0+)
pip install vapoursynth-descale

Compilation

Building the VapourSynth plugin:

uv build --wheel

For the AviSynth+ plugin:

meson setup build -Dlibtype=avisynth && meson compile -C build

Metadata

Release files for vapoursynth-descale 12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vapoursynth-descale 12
File Size Uploaded Provenance
vapoursynth_descale-12.tar.gz 25.5 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-descale 12
File
vapoursynth_descale-12-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vapoursynth_descale-12-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
vapoursynth_descale-12-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
vapoursynth_descale-12-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
vapoursynth_descale-12-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
vapoursynth_descale-12-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
vapoursynth_descale-12-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details

Total release size: 252.8 kB

Release files / vapoursynth_descale-12.tar.gz

Download URL vapoursynth_descale-12.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c64d8bd37cad9d455cbe8e3f3139a61c8b97af4425aba48d48ff31989a1f5a89
BLAKE2b-256 checksum
How to use checksums
0e67b9336f58a1f8b45d9e811715db936e2a36fafba3b33dfaa1865a41b37aa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-win_amd64.whl

Download URL vapoursynth_descale-12-py3-none-win_amd64.whl
Size 39.8 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a0b258a281f6f110a450396194d44bc00b77d2395392f9d1fbee832dfdb5c0de
BLAKE2b-256 checksum
How to use checksums
f83bf4490aed9b49376894e84509b408a35dffeae047d326d8dca3ddae32d6e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-musllinux_1_2_x86_64.whl

Download URL vapoursynth_descale-12-py3-none-musllinux_1_2_x86_64.whl
Size 38.1 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9730cbd412d836da4cbc98ac03488b2776a9ebe2b15d0436441dd79e6a008b02
BLAKE2b-256 checksum
How to use checksums
c7e0719b80d3d358d156177186422f479003ab53d29df658d1ea4a847991abb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-musllinux_1_2_aarch64.whl

Download URL vapoursynth_descale-12-py3-none-musllinux_1_2_aarch64.whl
Size 25.5 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
038d1e6f9cff7a0c1bdb6fe7cd22d4e0a43cca7847b1516c9fe597c784445fc9
BLAKE2b-256 checksum
How to use checksums
4d6796847fae3818d0a5314f7e9b5f88fef314ff92e88bf221834d31251b93d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL vapoursynth_descale-12-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 37.7 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9969dca2a6feb7cd5ff2b60e9198aa529f3db02f49d5c88556b3fbcaa822f05d
BLAKE2b-256 checksum
How to use checksums
4bd1a819ce28422ab16ecce9c0bfbb9a9683f143fba6e3558a08f4c587fbd7e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL vapoursynth_descale-12-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 25.6 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4a4b3494ac88b769333070ab279bb2d6590f37947f1669a6d628107007456793
BLAKE2b-256 checksum
How to use checksums
e7a999c648526f966cd00ca8decbb71194f51536e49e018738a87cd540404427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-macosx_11_0_arm64.whl

Download URL vapoursynth_descale-12-py3-none-macosx_11_0_arm64.whl
Size 25.0 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
101f146b32a3d5f7439f4aba663576fb74ab146b29cce520bb1d0b240bb1b2d2
BLAKE2b-256 checksum
How to use checksums
ab565ebbaa1734f423df497a3fca46b9ce1d134b71ae724422e35b9e0437436f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / vapoursynth_descale-12-py3-none-macosx_10_13_x86_64.whl

Download URL vapoursynth_descale-12-py3-none-macosx_10_13_x86_64.whl
Size 35.7 kB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
9206419849d74db3bac8fb5821f3feb5286450ad2df5f31776ba1e3ba6140347
BLAKE2b-256 checksum
How to use checksums
1fc54951c7f7cb9c309c7b62e539d9cd126acaefe761568f0c02fabf81bb5fde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Security for vapoursynth-descale 12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for vapoursynth_descale-12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

12 This release

8 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page