An open API service indexing awesome lists of open source software.

https://github.com/lofcz/toydct

A toy implementation of the JPEG encoder & decoder
https://github.com/lofcz/toydct

Last synced: 8 months ago
JSON representation

A toy implementation of the JPEG encoder & decoder

Awesome Lists containing this project

README

          

# Toy DCT
A toy implementation of the JPEG encoder & decoder in .NET sans file (de)serialization - (Run-length + Huffman).

The implementation sacrifices performance for simplicity intentionally and shouldn't be used for anything but admiring the beautiful math behind JPEG, MP3, and many other formats. Interestingly, many ideas in the plain old JPEG are used in ML even today - what else are VAEs but energy compaction functions? Quantization, another concept used in JPEG, is one of the pillars enabling cost-efficient LLMs deployment and inferring with models often too computationally intensive for consumer hardware.




DCT components retained in a 8x8 block: 1, 2, 8, 64.

If this sparked your interest, but the terms used above sound unfamiliar, I recommend the following videos:
- https://www.youtube.com/watch?v=0me3guauqOU
- https://www.youtube.com/watch?v=Kv1Hiv3ox8I