MJPEG encoder written in zig utilizing SIMD computation.
Find a file
2023-12-19 12:31:34 +05:00
src just the wait+change no longer works for some reason? switched to wake, somehow better performance 2023-12-19 12:31:34 +05:00
build.zig init 2023-11-24 13:15:08 +05:00
README.md README 2023-12-12 16:02:06 +05:00

img-stream-enc

continuous jpg encoder for piping raw YUV420P images to. Works well enough for 0.5 qual. For some reason anything higher tends to corrupt the output file.

Zig std lib only, Uses SIMD Vector optimization + pre-computing coefficients for quantization. Bottleneck is on rle, huffman code and output.

Not intended for actual use. Again higher qual tends to corrupt files, Corruption is progressive, and pixels start getting wonky well before, decoders complain, image is still usable though

zig build to a bin. Usage is img-stream-enc <width> <height> <quality> <n_jobs>

  • width: pixel width of input image (must be multiple of 16)
  • height: pixel height of input (multiple of 16)
  • quality: quality factor, float between 0 and 1
  • n_jobs: number of threads to spawn for quantization