818 B
818 B
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 1n_jobs
: number of threads to spawn for quantization