Results 1 to 8 of 8

Thread: Best decompression on embedded device

  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Best decompression on embedded device

    I'm relatively new to compression algorithms so my apologies in advance. I'm running on an older TI DSP (5402) and am running low on code space. We include a large image in our build that gets loaded to a daughter board and I want to compress that image pre-compiling. Then I'll include the decompressor in our code such that the image gets uncompressed as its loaded to the daughter board. So my considerations are:
    1. I don't care how fast the compressor is because it will only be done once and on a fast PC (so the code wont be included on my DSP)
    2. I need the decompressor as small as possible (obviously smaller than the amount it would save)
    3. Open source
    4. Decompression speed is not critical, but can't take forever either.

    RLE will be huge win, but any additional savings would be great. I've checked source forge. Any suggestions on algorithms would be much appreciated!

    Thanks,
    Dan

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,507
    Thanks
    742
    Thanked 665 Times in 359 Posts
    w/o numbers the question is meaningless

  3. #3
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,982
    Thanks
    377
    Thanked 351 Times in 139 Posts
    Quote Originally Posted by ikes View Post
    I'm relatively new to compression algorithms so my apologies in advance. I'm running on an older TI DSP (5402) and am running low on code space. We include a large image in our build that gets loaded to a daughter board and I want to compress that image pre-compiling. Then I'll include the decompressor in our code such that the image gets uncompressed as its loaded to the daughter board. So my considerations are:
    1. I don't care how fast the compressor is because it will only be done once and on a fast PC (so the code wont be included on my DSP)
    2. I need the decompressor as small as possible (obviously smaller than the amount it would save)
    3. Open source
    4. Decompression speed is not critical, but can't take forever either.

    RLE will be huge win, but any additional savings would be great. I've checked source forge. Any suggestions on algorithms would be much appreciated!

    Thanks,
    Dan
    Check out BALZ:
    http://balz.sourceforge.net/

  4. #4
    Programmer osmanturan's Avatar
    Join Date
    May 2008
    Location
    Mersin, Turkiye
    Posts
    651
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Considering a DSP architecture, there is no any advantage of using LZ/CM/PPM algorithm "especially" for an image. Here is the link for the datasheet of that DSP chip: http://focus.ti.com/lit/ds/symlink/tms320uc5402.pdf

    I didn't make a very deep looking of the datasheet but it's clear you should use some light-weight techniques. Because, this cheap has only 4K x 16-bits ROM and 16K x 16-bits RAM and it's computation power is 80 MIPS. So, some questions come to the scene:
    1-Could you provide some sample images? Are they artificial drawings or photographs? What's their dimensions and pixel depth?
    2-Are you using an extra chip as an auxiliary RAM? Or will you use?
    3-What's your expectation from the compression (ratio)?

    Two methods came into my mind for your purpose:
    1-DCT based JPEG-like compression (of course lossless and much simpler). If your chip doesn't support DCT spectral analyzing, you can achieve same thing with taking symmetric of the input signal and then calculating FFT on over it.
    2-A linear predictor (LPC).

    If you could provide some extra info, we can help you.
    BIT Archiver homepage: www.osmanturan.com

  5. #5
    Member
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The image I'm trying to compress is 8K. What other numbers do you need?

  6. #6
    Member
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the response. By image, I meant an executable image that gets loaded to the daughter board. Sorry. The image is 8K. About 50% of that will be compressed with RLE. So I'm then trying to squeeze an executable that is about 4K. I don't have a target compression ratio. Whatever I can squeeze out would be great, remembering that I need to factor in the size of the decompression code as well. Also, all of our code is in C/asm.

    Thanks again!
    Dan

  7. #7
    Member
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, and we do have plenty of space on an external RAM chip so no concerns there, but limited, if any space in internal RAM.

  8. #8
    Programmer osmanturan's Avatar
    Join Date
    May 2008
    Location
    Mersin, Turkiye
    Posts
    651
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK. Then you can prefer LZSS style decoder (it's too simple to decode). There are some discussions about it in this forum. Or ask Ilia (encode) for about LZSS (he has some experiments with it).
    BIT Archiver homepage: www.osmanturan.com

Similar Threads

  1. Decompression speed test
    By m^2 in forum Data Compression
    Replies: 8
    Last Post: 18th August 2010, 00:42
  2. Data decompression on in-memory kernel
    By cregd in forum Data Compression
    Replies: 8
    Last Post: 27th January 2009, 18:24
  3. Nanozip decompression data troubles
    By SvenBent in forum Data Compression
    Replies: 11
    Last Post: 12th January 2009, 23:25
  4. Decompression speed test3: music
    By m^2 in forum Data Compression
    Replies: 0
    Last Post: 8th December 2008, 17:49
  5. Decompression speed test2: installer
    By m^2 in forum Data Compression
    Replies: 1
    Last Post: 4th November 2008, 23:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •