This commit is contained in:
Muaz Ahmad 2023-12-12 16:02:06 +05:00
parent a6d204dc42
commit 14a95f0c18

14
README.md Normal file
View file

@ -0,0 +1,14 @@
# 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