Skip to main content

RGB packing for VapourSynth frames

Project description

VSPackRGB

RGB packing for VapourSynth frames.

Converts planar RGB VapourSynth clips into display-ready packed formats:

  • RGB24 → BGRA (8-bit interleaved, stored in GRAY32)
  • RGB30 → A2R10G10B10 (10-bit packed, stored in GRAY32)
  • RGB48 → RGBA64 (16-bit interleaved, stored in GRAY16)
  • RGBH → RGBA16F (16-bit float interleaved, stored in GRAYH)
  • RGBS → RGBA32F (32-bit float interleaved, stored in GRAYS)

For higher-than-10-bit formats, the output clip is 4x wider than the input to accommodate the interleaved R, G, B, and A channels.

Installation

Prebuilt wheels are provided for most platforms. If a compatible wheel is available, no compilation is required.

pip install vspackrgb

With uv:

uv add vspackrgb

Benchmarks

Blank clip with keep=True

            RGB24 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┓
┃ Backend            ┃ Frames ┃   Time ┃     FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━┩
│ vszip.PackRGB      │  20000 │ 5.917s │ 3379.98 │
│ libp2p.Pack        │  20000 │ 5.975s │ 3347.32 │
│ akarin.Expr        │  20000 │ 5.962s │ 3354.39 │
│ vspackrgb (cython) │   6000 │ 5.556s │ 1079.89 │
│ vspackrgb (numpy)  │   3000 │ 8.605s │  348.63 │
│ vspackrgb (python) │     25 │ 9.761s │    2.56 │
└────────────────────┴────────┴────────┴─────────┘

             RGB30 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃     FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩
│ vszip.PackRGB      │  20000 │  5.911s │ 3383.25 │
│ libp2p.Pack        │  20000 │  5.915s │ 3381.34 │
│ akarin.Expr        │  20000 │  5.933s │ 3370.95 │
│ vspackrgb (cython) │   6000 │  6.437s │  932.18 │
│ vspackrgb (numpy)  │   3000 │ 13.371s │  224.37 │
│ vspackrgb (python) │     25 │  7.044s │    3.55 │
└────────────────────┴────────┴─────────┴─────────┘

             RGB48 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃     FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩
│ libp2p.Pack        │  20000 │ 15.819s │ 1264.30 │
│ vspackrgb (cython) │   6000 │  8.459s │  709.29 │
│ vspackrgb (numpy)  │   3000 │ 12.185s │  246.20 │
│ vspackrgb (python) │     25 │  9.870s │    2.53 │
└────────────────────┴────────┴─────────┴─────────┘

             RGBH Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vspackrgb (cython) │   6000 │  8.883s │ 675.47 │
│ vspackrgb (numpy)  │   3000 │ 12.888s │ 232.78 │
│ vspackrgb (python) │     25 │  9.858s │   2.54 │
└────────────────────┴────────┴─────────┴────────┘

             RGBS Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vspackrgb (cython) │   6000 │ 23.383s │ 256.60 │
│ vspackrgb (numpy)  │   3000 │ 24.899s │ 120.48 │
│ vspackrgb (python) │     25 │  9.750s │   2.56 │
└────────────────────┴────────┴─────────┴────────┘

Real world scenario

            RGB24 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vszip.PackRGB      │  20000 │ 32.561s │ 614.23 │
│ libp2p.Pack        │  20000 │ 32.851s │ 608.82 │
│ akarin.Expr        │  20000 │ 33.114s │ 603.97 │
│ vspackrgb (cython) │   6000 │  9.998s │ 600.09 │
│ vspackrgb (numpy)  │   3000 │ 10.169s │ 295.02 │
│ vspackrgb (python) │     25 │  9.957s │   2.51 │
└────────────────────┴────────┴─────────┴────────┘

            RGB30 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vszip.PackRGB      │  20000 │ 35.110s │ 569.64 │
│ libp2p.Pack        │  20000 │ 35.950s │ 556.33 │
│ akarin.Expr        │  20000 │ 35.505s │ 563.31 │
│ vspackrgb (cython) │   6000 │ 10.987s │ 546.10 │
│ vspackrgb (numpy)  │   3000 │ 15.695s │ 191.14 │
│ vspackrgb (python) │     25 │  7.110s │   3.52 │
└────────────────────┴────────┴─────────┴────────┘

            RGB48 Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ libp2p.Pack        │  20000 │ 42.757s │ 467.76 │
│ vspackrgb (cython) │   6000 │ 13.680s │ 438.59 │
│ vspackrgb (numpy)  │   3000 │ 14.353s │ 209.02 │
│ vspackrgb (python) │     25 │  9.774s │   2.56 │
└────────────────────┴────────┴─────────┴────────┘

             RGBH Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vspackrgb (cython) │   6000 │ 13.862s │ 432.83 │
│ vspackrgb (numpy)  │   3000 │ 14.358s │ 208.95 │
│ vspackrgb (python) │     25 │  9.785s │   2.55 │
└────────────────────┴────────┴─────────┴────────┘

             RGBS Packing (1920x1080)             
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃ Backend            ┃ Frames ┃    Time ┃    FPS ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ vspackrgb (cython) │   6000 │ 32.984s │ 181.90 │
│ vspackrgb (numpy)  │   3000 │ 29.858s │ 100.48 │
│ vspackrgb (python) │     25 │  9.788s │   2.55 │
└────────────────────┴────────┴─────────┴────────┘

Building

You only need a working C compiler/toolchain for your platform:

  • Windows: Visual Studio Build Tools (Desktop development with C++)
  • Linux: GCC/Clang and Python headers
  • macOS: Xcode Command Line Tools
uv build --sdist --wheel --verbose

Project details


Download files

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

Source Distribution

vspackrgb-1.2.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distributions

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

vspackrgb-1.2.1-cp312-abi3-win_amd64.whl (75.4 kB view details)

Uploaded CPython 3.12+Windows x86-64

vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_x86_64.whl (447.5 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_aarch64.whl (435.1 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ ARM64

vspackrgb-1.2.1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (450.7 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

vspackrgb-1.2.1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (444.6 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

vspackrgb-1.2.1-cp312-abi3-macosx_13_0_x86_64.whl (86.8 kB view details)

Uploaded CPython 3.12+macOS 13.0+ x86-64

vspackrgb-1.2.1-cp312-abi3-macosx_13_0_arm64.whl (81.5 kB view details)

Uploaded CPython 3.12+macOS 13.0+ ARM64

File details

Details for the file vspackrgb-1.2.1.tar.gz.

File metadata

  • Download URL: vspackrgb-1.2.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vspackrgb-1.2.1.tar.gz
Algorithm Hash digest
SHA256 68a5dccc08aa6d23b28ad71c2eea847e60d2b089ff70d3577f2c539d62a84d67
MD5 4fab7f7ade39190260f56df3fe368def
BLAKE2b-256 900383ff4a4f4c74dddac1f8979a934d7db34f03ef34bf1a366d3fcbdcfd45b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1.tar.gz:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: vspackrgb-1.2.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 75.4 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3b38f7248e3b018ff441454333dea2c46c997be72814264e8c35113271c65a10
MD5 f40902815d5c28ede1e408619b5b87a0
BLAKE2b-256 d356f0504ea8ddf61248904562e2940e2c3666edcf5889e1746f7aef8d8f2ed8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-win_amd64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4c5147235587452842617c88e5c7605ffc835d5c570d22a2cb5d5629dff2cce6
MD5 b390d0b56d3f180a71400fcc20d91949
BLAKE2b-256 3422ec45920311aa4d3e247740506891290dada82074d0e447a8de9ad9282c07

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6fa78713eaed0f7d0b63510528a6f1128ddfd523592859cfc83106e9cb6731d6
MD5 906e191882dec656018a98725df4eb50
BLAKE2b-256 fc4e48c5cd7e6f907d897b94d2a9a1702cf389cef79be2dc0172521ad1138840

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-musllinux_1_2_aarch64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c5b0d4da4305a05646e30e31e361947bb8355eb259677655fddb608c15826e5
MD5 dd06efaa30aebb730966c520eb58f253
BLAKE2b-256 ce4e6c6b66f03a4b68104f9f86f25fedcb5e4043133475234a950f5939a340dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 13ab23af8ff8a25d5a5f51465c3bc17a39c41e6746e7b54ca831d72b00f870b1
MD5 911380516a920c74bb4e24bcfb262139
BLAKE2b-256 7232aa8a4f9cd58bad4ccff2cfe279afb4da5a040e63354be723061bf1377955

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 11210c3a2e900e50f4632a41e9576f64af68df559f3d18fba2bd9deb96b8139d
MD5 72103291cc1aac77c901ca06cf8294a3
BLAKE2b-256 06903fb40ecd7a7a33776e93b0c2c72044ecc0a33bdec2d5628a8063c6788cdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-macosx_13_0_x86_64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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

File details

Details for the file vspackrgb-1.2.1-cp312-abi3-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for vspackrgb-1.2.1-cp312-abi3-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5904e69d51b1db5975427b103ea8ec0f83e3db543d2972c8632262b7633c7450
MD5 87145e8d8d112d37351eeb535ac24555
BLAKE2b-256 f6e3aa921ab8964caf90954bd857aaa525c72d30acef0e241d9e0ad5b29523d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vspackrgb-1.2.1-cp312-abi3-macosx_13_0_arm64.whl:

Publisher: pypipublish.yml on Jaded-Encoding-Thaumaturgy/vs-view

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