4 ms·
Most modern A/V codecs won't fit in that limit by several orders of magnitude. Even standard-compliant JPEG decoder would be hard to squeeze without some serio
by magnat 3y ago
Most modern A/V codecs won't fit in that limit by several orders of magnitude.
Even standard-compliant JPEG decoder would be hard to squeeze without some serious codegolfing. Discarding some barely used features gets you close to that limit, though [1].
Smallest popular TCP/IP stack [2] is ~20kLoC.
[1] https://github.com/richgel999/picojpeg https://github.com/richgel999/picojpeg
[2] https://savannah.nongnu.org/projects/lwip/ https://savannah.nongnu.org/projects/lwip/
- epr 3y agoA JPEG decoder or TCP stack are very clearly not individual concepts though. There's obviously some subjectivity as to what constitutes a single "concept" or "algorithm", but I'm not sure either of those two examples are in a gray area. A single concept might be implementing just ARP or a discrete cosine transform. If you wanted to do a full TCP stack or JPEG decoder, that would make a lot more sense after building their internal components one by one.
- naasking 3y agoJPEGDEC seems to be about 500 lines: https://github.com/bitbank2/JPEGDEC https://github.com/bitbank2/JPEGDEC
- frankjr 3y agoMore like 5000 https://github.com/bitbank2/JPEGDEC/blob/master/src/jpeg.inl https://github.com/bitbank2/JPEGDEC/blob/master/src/jpeg.inl