adaptivegrain filter as a VapourSynth plugin.
Project description
Adaptivegrain-rs
Reimplementation of the adaptive_grain mask as a Vapoursynth plugin. For a description of the math and the general idea, see the article.
Usage
core.adg.Mask(clip, luma_scaling: float)
You must call std.PlaneStats() before this plugin
(or fill the PlaneStatsAverage frame property using some other method).
Supported formats are YUV with 8-32 bit precision integer or single precision float.
Half precision float input is not supported since no one seems to be using that anyway.
Since the output is grey and only luma is processed,
the subsampling of the input does not matter.
To replicate the original behaviour of adaptivegrain, a wrapper is provided in kagefunc. It behaves exactly like the original implementation (except for the performance, which is about 3x faster on my machine).
Parameters
clip: vapoursynth.VideoNode
the input clip to generate a mask for.
luma_scaling: float = 10.0
the luma_scaling factor as described in the blog post. Lower values will make the mask brighter overall.
Build instructions
If you’re on Arch Linux, there’s an AUR package for this plugin. Otherwise you’ll have to build and install the package manually.
cargo build --release
That’s it. This is Rust, after all. No idea what the minimum version is, but it works with stable rust 1.83. That’s all I know. Binaries for Windows and Linux are in the release tab.
FAQ
Why do I have to call std.PlaneStats() manually?
Because I didn’t want to reimplement it.
Because I was too dumb to realize this exists.
I’ll fix that at some point.™kagefunc.adaptive_grain(clip, show_mask=True) does that for you and then just returns the mask.
Why doesn’t this also add grain?
I was going to do that originally, but I didn’t want to reimplement grain when we already have a working grain filter (multiple even, which gives you the option to choose whichever you want).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vapoursynth_adaptivegrain-0.5.0.tar.gz.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f68b2953f459d74bd31b4af4b308811917f70623f8bd40b30ab4664bd6d699f
|
|
| MD5 |
42aaa8d63d589c70cab1ddab90279ade
|
|
| BLAKE2b-256 |
6e8aaa50da0374b1339f5ce3c9a404c37b6e5f80fdf210d17b90bdf2d2550ae6
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0.tar.gz:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0.tar.gz -
Subject digest:
9f68b2953f459d74bd31b4af4b308811917f70623f8bd40b30ab4664bd6d699f - Sigstore transparency entry: 1440922356
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_adaptivegrain-0.5.0-py3-none-win_amd64.whl.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0-py3-none-win_amd64.whl
- Upload date:
- Size: 258.6 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba68c65cf62a96bc2990d78ba80f593b63b2f9baf83f48f51c319f75d095cedb
|
|
| MD5 |
deede3e903b83de3ea7b1d28e3622962
|
|
| BLAKE2b-256 |
61dc1cf8ec79096ec83e2d6c223a44ece12ac2c5849f4c4b73f033ee2dea292d
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0-py3-none-win_amd64.whl:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0-py3-none-win_amd64.whl -
Subject digest:
ba68c65cf62a96bc2990d78ba80f593b63b2f9baf83f48f51c319f75d095cedb - Sigstore transparency entry: 1440923104
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 553.6 kB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3df06e2f32239e20634c533145e977dc68a8fc62739ec4a7053e9e0d224f592
|
|
| MD5 |
eb19e7f4ba5668d81fdb120a165e7968
|
|
| BLAKE2b-256 |
a903588328b944be32e270b24d6a94b06a6c4da200f0e8e22aba273cf24f554f
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
f3df06e2f32239e20634c533145e977dc68a8fc62739ec4a7053e9e0d224f592 - Sigstore transparency entry: 1440922840
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 177.3 kB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a8b89a643b1710b6b6316bfec07fef9f1a4c727ddcae76bcbd7886fc2e43d78
|
|
| MD5 |
94b26f0f2a8ad24cf5976b983a9bee53
|
|
| BLAKE2b-256 |
1706103226ffaaa3217c140de17eb2d00a7c515d173e65ca101925f998bae67b
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
4a8b89a643b1710b6b6316bfec07fef9f1a4c727ddcae76bcbd7886fc2e43d78 - Sigstore transparency entry: 1440922531
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_x86_64.whl.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_x86_64.whl
- Upload date:
- Size: 370.9 kB
- Tags: Python 3, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
974fe652716f6bcfdf6b03657cc905042bcaa6dec7aadb12acc45e6c7244a4f8
|
|
| MD5 |
2d7986ab043feae7c2966700fd11c8af
|
|
| BLAKE2b-256 |
5f858259a8572717fcb0ddd5361564246e0f7ea4f0ac83f5e5dceaeae7643a20
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_x86_64.whl:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_x86_64.whl -
Subject digest:
974fe652716f6bcfdf6b03657cc905042bcaa6dec7aadb12acc45e6c7244a4f8 - Sigstore transparency entry: 1440922987
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_arm64.whl.
File metadata
- Download URL: vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_arm64.whl
- Upload date:
- Size: 182.8 kB
- Tags: Python 3, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf7c67edc1fac2a985ce3ba7436847a2ac375b6f1f96dd27e760dd6cab7535f0
|
|
| MD5 |
75138122ee420f3d09984438f732d5b8
|
|
| BLAKE2b-256 |
dbb955f5f08c46965448c3ab4bdc34d38e7ef5189f5120ba2398291c38c266a2
|
Provenance
The following attestation bundles were made for vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_arm64.whl:
Publisher:
publish.yml on kageru/adaptivegrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_adaptivegrain-0.5.0-py3-none-macosx_13_0_arm64.whl -
Subject digest:
cf7c67edc1fac2a985ce3ba7436847a2ac375b6f1f96dd27e760dd6cab7535f0 - Sigstore transparency entry: 1440922711
- Sigstore integration time:
-
Permalink:
kageru/adaptivegrain@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/kageru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b9d6698f3cebf68bfa4ab4b9efb8a5df43e7b4e -
Trigger Event:
push
-
Statement type: