home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / graphics / tiff / unix / archive.z / archive / text0045.txt < prev    next >
Encoding:
Text File  |  1995-09-20  |  1.8 KB  |  40 lines

  1. Kyriakos Georgiou writes...
  2. > In response to Sam's comments:
  3. > >     Also, can the current libtiff G4 decompression implementation be
  4. > >     improved ? What sort of improvements can be expected ?
  5. > > 
  6. > > What's wrong with the current implementation?
  7. > The current implementation is fine, but.. I have in my hands a commercial
  8. > product (no source) that does decompression in noticable less time.
  9. > That suggests that there are faster ways to decompress G4 in software,
  10. > alas my question.
  11.  
  12. I cannot speak for the G4 decompression in libtiff, but I can vouch for the
  13. fact that the libtiff G3 decompression is not as fast as at least my own
  14. implementation.  However, I am not at liberty to provide the source code
  15. since it belongs to my employer.
  16.  
  17. In my experience with G3, I found the fastest way was to completely unroll
  18. the decompression.  I tried numerous different 'elegant' algorithmic
  19. approaches over a period of about 3 years and discovered that the simple
  20. brute force unrolled approach was always fastest.  The decoder itself is
  21. something like 700 lines of nested C language if-else statements.
  22.  
  23. I did not write those 700 lines, though.  Instead, I wrote a program that
  24. wrote those lines for me.  From time to time, I've been tempted to
  25. change the decoder-generator program to output assembler instead of
  26. C code.  I think that would ultimately be the fastest possible
  27. implementation for any particular architecture (with the exception
  28. of a full lookup table which takes up an impractical amount of RAM
  29. on typical machines available today).
  30.  
  31. -- 
  32. Rick Richardson           Senior Staff Engineer   Visit my WWW home page:
  33. DigiBoard APD           Email: rick@digibd.com  http://www.digibd.com/people/rick
  34. 6801 Shady Oak Rd.     Fax:   (612) 947-1129   
  35. Eden Prarie, MN 55344  Tel:   (612) 947-1111   <standard disclaimer>
  36.  
  37.