Data compression algoithm for MCF5328

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Data compression algoithm for MCF5328

2,405 次查看
Juerg
Contributor I
Hi all,
 
I am looking for a simple data compression algorithm to run on a MCF5328. We are conducting bitmaps with a camera and I would like to compress the collected datablock (Huffman, ZIP, ..). Does anybody know a simple and efficient ANSI-C code for compression and decompression?
 
Thanks in advance
Jürg
标签 (1)
0 项奖励
回复
3 回复数

787 次查看
mjbcswitzerland
Specialist V
Hi Jürg

Take a look at zlib: http://en.wikipedia.org/wiki/Zlib

It is open source and free to use.

I have used it for extraction of compressed BMPs (mini GZIP format as recognised by 7-ZIP) - eg. 4k gz extracts to 45k BMP - it works with a few kBytes or working memoiry (when set up appropriately). Expect about 3ms extraction time for 2k of extracted data (with 50MHz processor).

I have heard that the compression is more complicated but I haven't actually done this side.

Good luck

Regards

Mark

www.uTasker.com



0 项奖励
回复

787 次查看
Juerg
Contributor I
Hi Mark
 
Thank you for your hint
We tryed to zip a 100k bitmap with the code from http://www.zlib.net/ an it took about 3 s to compress it to 30 k. There are 6 frames/s coming in and it looks like there was quite a bit of optimisation necessary.
Decompression took about 200 ms.
 
Gruss
Jürg 
0 项奖励
回复

787 次查看
mjbcswitzerland
Specialist V
Hi Jürg

I have heard that the compression side is more complicated but I didn't expect these times.
I had to change some settings so that the RAM workspace was reduced - originally it required about 70k for the work space and did buffer conversions in steps of 32k. Since I use devices with rather less memory than that I had to reduce to 2k buffer conversions (I think they are called windows) and I was getting about 3ms extraction times per 2k buffer. (I understand that the 32k window also results in an optimum performance).

Programs like 7ZIP have a fixed 32k windows size and can not compress to use smaller ones. Therefore MiniGZIP has to be used.

Unfortunately I am not what one calls an expert on this subject. I just used it recently and had to solve the windowing problem to get it working in my system. But my knowledge stops about there...

Regards

Mark

0 项奖励
回复