Giter Club home page Giter Club logo

jpegdecoder's Introduction

JFIF/JPEG image decoder, made as a learning exercise.

Takes a 24-bit RGB baseline JFIF/JPEG file and displays the decoded image in a new window using SDL.

I have tried to balance portability and performance as well hopefully getting the decoding correct.

8-bit greyscale, progressive, and arithmetic coding are not supported (yet).

I implemented my own Huffman tree searcher which flattens a Huffman tree into an array and can directly use the Huffman symbol to look up the codeword in constant-time. It is rather expensive in terms of memory usage - 128kB per huffman table, which rules out implementation on smaller platforms, but is quite acceptable for larger platforms.

My original inverse-DCT was the classic naïve O(n^2) approach which I identified as a huge bottleneck using gprof, and replaced with a row-then-column butterfly DCT (same approach as optimising FFT).

jpegdecoder's People

Contributors

matja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.