Skip to content

QOI support for IIP#5846

Open
jerch wants to merge 6 commits intomasterfrom
qoi_decoder
Open

QOI support for IIP#5846
jerch wants to merge 6 commits intomasterfrom
qoi_decoder

Conversation

@jerch
Copy link
Copy Markdown
Member

@jerch jerch commented Apr 26, 2026

Adds QOI support to the image addon.

Part of #5845.

Some benchmarks with https://github.com/jerch/sixel-bench (all my machine™ with Chromium):

Format Protocol TP in MB/s FPS VSCode MB/s VSCode FPS VSCode Penalty
Sixel Sixel 39.46 227.92 5.8 33.48 6.8x
PNG IIP 21.77 104.48 4.7 22.58 4.6x
JPEG IIP 4.71 200.04 3.0 127.44 1.6x
QOI IIP 43.78 229.31 - - -
PNG Kitty 17.93 86.09 4.3 20.66 4.2x

Observation: QOI leads in throughput and FPS. Sixel is close behind but unusable for quick encoding and due its lower quality. The kitty implementation with PNG is worse than for IIP, prolly not as heavily optimized yet.

On a sidenote: Webkit/Safari is actually faster than Chromium yielding 2.82s (46.45 MB/s, 243.31 fps) for QOI. For Kitty it performs much worse with ~12 MB/s.

Edit: Added vscode numbers for comparison to xterm.js demo.

@jerch jerch mentioned this pull request Apr 26, 2026
12 tasks
@jerch jerch marked this pull request as draft April 26, 2026 22:16
@jerch jerch marked this pull request as ready for review April 29, 2026 13:14
@jerch
Copy link
Copy Markdown
Member Author

jerch commented Apr 29, 2026

@Tyriar, @anthonykim1 This also removes the Image-load shim around missing createImageBitmap in older Safari (<16.4, fixed in Safari since March 27, 2023).

@jerch jerch changed the title qoi support for IIP QOI support for IIP Apr 29, 2026
@jerch
Copy link
Copy Markdown
Member Author

jerch commented Apr 29, 2026

@Tyriar, @anthonykim1 Added numbers for vscode above in the table. Something in vscode terminal is sucking hard on the effective throughput, especially when the input is big (thus JPEG is less affected).

To repro yourself in vscode terminal:

git clone git@github.com:jerch/sixel-bench.git
cd sixel-bench
cat parts_* > blobs.tar.gz
tar -zxf blobs.tar.gz
reset
python run.py data/data.sixel
reset
python run.py data/data.iip.png

The reset is needed for the speed result numbers to show up. I don't know why it doesn't work without, seem the terminal tries to be smart about the prompt line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant