All Projects → mdejong → MetalHuffman

mdejong / MetalHuffman

Licence: other
A GPU huffman decoder for iOS on top of Metal

Programming Languages

objective c
16641 projects - #2 most used programming language
C++
36643 projects - #6 most used programming language
Metal
113 projects
Objective-C++
1391 projects
c
50402 projects - #5 most used programming language

MetalHuffman

A GPU huffman decoder for iOS on top of Metal, adapted from Basic Texturing example provided by Apple. This decoder is known to work on iOS and should work on other Metal capable hardware.

Overview

This project implements a huffman decoder directly on top of Apple's Metal API. Inspired by [huff0] https://github.com/Cyan4973/FiniteStateEntropy

Decoding Speed

This code is needed for 1 reason only, speed! Decoding bytes of grayscale image data to be precise. While huff0 is an impressive approach, it is not as fast as lz4. Even lz4 is not fast enough to decode video at full screen iOS sizes of 2048x1536 at 30 FPS. The decoding needs to be done directly on the GPU so this code was created.

Implementation

See AAPLRenderer.m and AAPLShaders.metal for the core GPU rendering logic. A table based huffman encoder and decoder are also included.

http://www.modejong.com/blog/post22_metal_huffman

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].