| View previous topic :: View next topic |
| Author |
Message |
Dennis Guest
|
|
| Back to top |
|
 |
Dennis Guest
|
|
| Back to top |
|
 |
Sanyin Guest
|
Posted: Mon May 07, 2007 6:54 pm Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Is there any translations of this library to delphi? |
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Tue May 08, 2007 1:08 am Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Thank you very much Dennis.
I wonder how much work it is to turn this NASM code into inline assembler in
Delphi. It also seems that the SSE2 code as found in Intel AP-945 is the
fastest solution.. interesting.
I should point out that it seems the original code by Thomas G. Lane uses
more bits of precision than I use in my code (I use 9). I however found out
that some jpegs around seem to need this "extra space" to avoid integer
overflow. I also saw another solution somewhere that split up one of the
calculations in two parts to limit the chance of overflow. I would think
though, that 9 bits of precision is more than enough for this kind of thing.
Also note that the "fast" algorithm uses premultiplied de-quantization
factors, while the "accurate" algorithm uses the given de-quantization
factors (from the DQT table) directly.
If you want I can send you a version of my jpeg library to your email. It is
not open source however. It contains some nifty things:
- All lossless operations, including:
- flip horizontal/vertical
- transpose
- rotate 90/180/270
- lossless cropping
- semi-lossles brightness and contrast adjustment (working directly on the
DCT coefficients)
- Determination of optimal Huffman tables
- Baseline and progressive decoding, baseline encoding
- ICC profile extraction
- Meta-data extraction (EXIF, JFIF, COM, IPTC, etc).
- Many color conversions (reads CMYK jpegs just fine, for instance), based
on JFIF and Adobe App14 markers, and some other info.
- half-size, quarter-size and 1/8 size loading
I found that saving the jpegs coming from my digital camera with optimized
Huffman tables already gave an increase in compression around 10%. This is a
lossless process! It is possible because the camera uses "standard" Huffman
tables, which aren't optimized per particular image. Determining the optimal
Huffman tables is trivial compared to the time it takes to actually encode
the image to a stream. My jpeg lib can do this without loosing any of the
metadata contained in the image.
Nils
www.simdesign.nl
"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> schreef in bericht
news:46378d15 (AT) newsgroups (DOT) borland.com...
|
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Tue May 08, 2007 9:22 pm Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Hi Nils
| Quote: | If you want I can send you a version of my jpeg library to your email. It
is
not open source however. It contains some nifty things:
|
I would like that ;-)
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Tue May 08, 2007 9:25 pm Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Hi Nils
| Quote: | I wonder how much work it is to turn this NASM code into inline assembler
in
Delphi. It also seems that the SSE2 code as found in Intel AP-945 is the
fastest solution.. interesting.
|
If somebody wants to win this challenge they will try that or something
better ;-)
I hope that I will find the time and energy to try make some functions, but
I will first focus on the B&V.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Wed May 09, 2007 1:35 am Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Is the email with which you post valid? If so, I'll send you the sources by
email.
Nils |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Wed May 09, 2007 7:57 pm Post subject: Re: Fastcode IDCT B&V 0.0.1 |
|
|
Hi Nils
| Quote: | Is the email with which you post valid? If so, I'll send you the sources
by
email.
|
Yes.
Fine;-)
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
|