Description
Bifrost is a temporal derainbowing filter created by Fredrik Mellbin.
The original Avisynth plugin (version 1.1) worked on the whole frame or not at all. This version works on blocks, meaning that static parts of the image can be processed even if something moves on screen.
The VapourSynth plugin will accept any 8 to 16 bit integer YUV format. The Avisynth plugin is still limited to YV12.
Usage
bifrost.Bifrost(clip clip[, clip altclip=clip, float luma_thresh=10.0, int variation=5, bint conservative_mask=False, bint interlaced=True, int blockx=4, int blocky=4])
altclip
Bifrost will copy from this clip the chroma of the blocks it can’t process. This allows moving blocks to be processed with some other filter. altclip must have the same format, dimensions and length as clip.
luma_thresh
Blocks where the luma changes less than this are considered static and may be processed.
variation
Controls how big a chroma change must be in order to be considered a rainbow. Increasing this can reduce false positives.
Note: luma_thresh and variation are given in 8 bit sample units and are scaled to the clip’s bit depth internally, so the same values behave the same way at any depth.
conservative_mask
If true, only pixels detected as rainbows will be processed. Otherwise, pixels that have rainbows above and below them will also be processed.
interlaced
If true, SeparateFields, DoubleWeave and SelectEvery will be invoked in order to process the top and bottom fields separatedly.
blockx
blocky
The dimensions of the blocks. Smaller is probably better. The default 4×4 should be good enough. They must be a multiple of the clip’s subsampling, at least two chroma samples wide and tall, and no larger than the frame.
Note: If the dimensions of the image aren’t divisible by blockx and blocky, the right and/or bottom edges won’t be processed. The chroma of those edges is copied from altclip, same as for any other block Bifrost can’t process.
Types of rainbows
When dealing with telecined material you must determine if the rainbows were added before or after the telecine process. Find a scene with clearly visible rainbows and use the following:
src = your.Source() separated = std.SeparateFields(src) even = std.SelectEvery(separated, 2, 0)
If the rainbows change every frame, they were added after telecine. If there is a duplicate every five frames, they were added before.
Rainbows added before telecine
First you must fix the telecine, then use Bifrost in progressive mode:
ret = d2v.Source("rainbows1.d2v")
ret = vivtc.VFM(ret, order=1, chroma=False, mchroma=False)
ret = vivtc.VDecimate(ret, chroma=False)
ret = bifrost.Bifrost(ret, interlaced=False)
Rainbows added after telecine
In this case, Bifrost should be used in interlaced mode, right after the source filter:
ret = d2v.Source("rainbows2.d2v")
ret = bifrost.Bifrost(ret, interlaced=True)
# ivtc here
Installation
pip install vapoursynth-bifrost
Compilation
Requires Meson >= 1.2.3 and a C++17 compiler. VapourSynth must be installed and importable by the Python that Meson finds, because the include path is queried with vapoursynth.get_include(). That same interpreter also decides where the plugin installs (<site-packages>/vapoursynth/plugins).
meson setup build ninja -C build
If you have several Python installations, point Meson at the right one with a native file containing:
[binaries] python = '/path/to/python'
and passing --native-file to meson setup.
To build a wheel instead:
python -m build
DLLs for Avisynth 2.5.8+ can be found in the “releases” section.
License
The license is WTFPL; see the LICENSE file.
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_bifrost-4.0.tar.gz.
File metadata
- Download URL: vapoursynth_bifrost-4.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f90612df4aa3a111a1fd6607efe1951afba4867ac6623281054702cded426c0b
|
|
| MD5 |
a757fffc4fe03ecc75ac774a0b2b9154
|
|
| BLAKE2b-256 |
2c1b6820b3f14fb53332b3a38553820fc54d08b5891b814d094a422b1e0d87e4
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0.tar.gz:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0.tar.gz -
Subject digest:
f90612df4aa3a111a1fd6607efe1951afba4867ac6623281054702cded426c0b - Sigstore transparency entry: 2506913279
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-win_amd64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-win_amd64.whl
- Upload date:
- Size: 210.2 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d30dd3c99b09b71c470486440a2143d02a01f05eb5d9760126289692b9dc7fa
|
|
| MD5 |
14a668bf8b096397a39d0b731ce80724
|
|
| BLAKE2b-256 |
d501863a55724fd35b175e571b20946736717852e7c8ed6ed7a10462c9f76a5b
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-win_amd64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-win_amd64.whl -
Subject digest:
8d30dd3c99b09b71c470486440a2143d02a01f05eb5d9760126289692b9dc7fa - Sigstore transparency entry: 2506916413
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12b3f8342b2ebc10eb2951f517d250881d43f334dd675f2ef9204b811c26a410
|
|
| MD5 |
54e1756768a1b8218271c26abcdad874
|
|
| BLAKE2b-256 |
17356d6c3179ae22a6e8c4d2b357b80cf02eb6e2aecc29d27b9b16f04911166f
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
12b3f8342b2ebc10eb2951f517d250881d43f334dd675f2ef9204b811c26a410 - Sigstore transparency entry: 2506913562
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 999.3 kB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57aecf36d3df0aad4d0ab8172d665372423cabd7170078ac65f2ae12a5bf20ae
|
|
| MD5 |
ce8aed1ee10091cd6771a1ba2993625f
|
|
| BLAKE2b-256 |
2f5f8a05429e0c037c952da7b77120a8c47a8303b4694aabb8cce8cfa1be1980
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
57aecf36d3df0aad4d0ab8172d665372423cabd7170078ac65f2ae12a5bf20ae - Sigstore transparency entry: 2506913421
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 182.2 kB
- Tags: Python 3, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0144ea7596aa0bfcd9780da0a8979a3a150b4552bd8364d93111be090ba52b9
|
|
| MD5 |
14fbe4ea98d3761676e3141e1aecfd76
|
|
| BLAKE2b-256 |
8ce1a40673957ecfb50254a34ce4f172d3f3e602785bdc5a461a683479279f00
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
f0144ea7596aa0bfcd9780da0a8979a3a150b4552bd8364d93111be090ba52b9 - Sigstore transparency entry: 2506915004
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 168.9 kB
- Tags: Python 3, manylinux: glibc 2.24+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a33bc0f47b68a2d39595c4232976051aabe386908d3b3d46661a254e00d7ca7
|
|
| MD5 |
bda4ebf0ae6cd3321d67b264f0691db2
|
|
| BLAKE2b-256 |
2d3a93a170fd2ac83726952af4e1405582134ef08ac8daa0831096d3508312be
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
9a33bc0f47b68a2d39595c4232976051aabe386908d3b3d46661a254e00d7ca7 - Sigstore transparency entry: 2506913338
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d535817d9902f5b8caa7114d8d8238eb7b702e5e56972f4b88ea2b9e7efdcb8
|
|
| MD5 |
31ad42079ae524482163b70a9e2b2926
|
|
| BLAKE2b-256 |
9f161261814ab0d021ea442cf60fb6a4a258e048a024d896991dd448c0f98ea8
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
1d535817d9902f5b8caa7114d8d8238eb7b702e5e56972f4b88ea2b9e7efdcb8 - Sigstore transparency entry: 2506916261
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl.
File metadata
- Download URL: vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1add287386313c9a984f161e8976e28db3f0d0365f82d4ca965f4c4fa327464e
|
|
| MD5 |
4c218c05df0e17a88121c14c97a0fc03
|
|
| BLAKE2b-256 |
3b3469433b62177d410a58f48cc9d20d4c421430f88c5084747fa40f0b0a2494
|
Provenance
The following attestation bundles were made for vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl:
Publisher:
build.yml on dubhatervapoursynth/vapoursynth-bifrost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bifrost-4.0-py3-none-macosx_10_15_x86_64.whl -
Subject digest:
1add287386313c9a984f161e8976e28db3f0d0365f82d4ca965f4c4fa327464e - Sigstore transparency entry: 2506916337
- Sigstore integration time:
-
Permalink:
dubhatervapoursynth/vapoursynth-bifrost@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Branch / Tag:
refs/tags/v4.0 - Owner: https://github.com/dubhatervapoursynth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@68cb17396a6cd40342f70fda3e7e0c4e9857be64 -
Trigger Event:
push
-
Statement type: