compeg

Crates.iocompeg
lib.rscompeg
version0.4.0
sourcesrc
created_at2023-11-07 18:25:12.816977
updated_at2024-07-23 19:24:59.243456
descriptionA JPEG decoder implemented as a WebGPU compute shader
homepage
repositoryhttps://github.com/SludgePhD/Compeg
max_upload_size
id1028301
size2,789,615
Sludge (SludgePhD)

documentation

README

This is an experiment to use WebGPU Compute Shaders to decode JPEG images. The main Purpose of this project is to learn how to write compute shaders.

It performs surprisingly well on my RX 6700 XT, with GPU times of around 1 ms at high GPU clocks (and 2ms spent doing preprocessing on the CPU) when decoding a 4k test image.

The approach used here is restricted to baseline JPEGs that make heavy use of restart intervals. These types of JPEGs are typically produced by hardware encoders in GPUs, phones and webcams.

Due to technical limitations, only YUV JPEGs that make use of 4:2:2 chroma subsampling are supported. In the future this restriction may be lifted.

Commit count: 72

cargo fmt