⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 entropyencoder.txt

📁 encoder jpeg project
💻 TXT
字号:
Entropy Encoder

The JPEG image compression core comprises of two main subdivisions.  One is the "Encoder Model" and other is the "Entropy encoder".  These files implement various modules of the "Entropy encoder".  

The function of the entropy encoder is to perform lossless compression of quantized and zig zagged DCT matrix using zero runlength coding and then finally variable length coding that is Huffman coding.  This module outputs the final compressed data stream.

Before the actual Huffman encoding is performed, the 64 data values are transformed into an intermediate represnetation.

 - The first value of the block called the DC value is stored as the difference from previous value as this results in a smaller no.

 -  The negative values are decremented by one to convert them as  JPEG uses minimal codes called variable length integers to store the non zero values. These variable length integer require a category no. telling how many bits the integer uses.

 - The zero values are eliminated and instead their count is stored.

Finally, the data stream consists of runlength, category pairs with every non-zero coefficient.  These runlength, category pairs are actually huffman encoded.  The final compressed data consists of the Huffman codes along with variable length integer codes.

Our Entropy encoder module is made up of  sub modules and each of these modules perform the steps mentioned earlier in a pipelined manner.  manner.

[ZRLC] The zero-runlength coder calculates the delta DC, generates the zero-runlegth count and decrements the data -ve values.  It also generates a 5-bit status field with every values it outputs.

[Category Selection] The category selection module generates the required category for each incoming coefficient.

[Strip logic] The zero-strip logic strips the zero co-efficient from the data stream.

[Huffman] The huffman encoder module performs the Huffman encoding.

[Data packer] and finally the data packer packs the outgoing  compressed data into word length outputs.   Now, we take a brief look at the architectures of each of these sub-modules.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -