Huffman Module

I was stuck a bit while implementing the Huffman Module initially. I was thinking about implementing huffman tables on fly but soon realised it’s a very difficult task.

Finally I changed my plan to build the tables using the JPEG Standards.

I added all the huffman encoded values in a csv file and then built rom tables using the csv file.

The huffman module have a small state machine sitting inside it which makes a unique serial code from the given parallel code which is huffman encoded.

We generally concat both variable length integer (run length encoded) and variable length code(huffman encoded) and store them in a FIFO.
In some cases when the input to the run length encoder do not have any zeroes, it will be bad to compress them using huffman encoder because it do not save any space.

Fianlly, the huffman encoder is merged into the main repo.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s