Using Huffman coding to compress images taken by the iPhone camera

后端 未结 2 1559
半阙折子戏
半阙折子戏 2021-01-25 04:14

Im thinking to use the Huffman coding to make an app that takes pictures right from the iPhone camera and compress it. Would it be possible for the hardware to handle the comple

2条回答
  •  花落未央
    2021-01-25 04:40

    There are 2 parts, encoding and decoding. The encoding process involves constructing a tree or a table based representation of a tree. The decoding process covers reading from huff encoding bytes and undoing a delta. It would likely be difficult to get much speed advantage in the encoding as compared to PNG, but for decoding a very effective speedup can be seen by moving the decoding logic to the GPU with Metal. You can have a look at the full source code of an example that does just that for grayscale images on github Metal Huffman.

提交回复
热议问题