I was just wondering if anyone is familiar with JPEG compression.
I have written a compression algorithm in Delphi which seems to lose a little more of the crispness than the JPEG output from a program like PSP8.
Not that its overly important.. I was just wondering if anyone might know the cause of the problem, and how i might go about fixing it.
I have written a compression algorithm in Delphi which seems to lose a little more of the crispness than the JPEG output from a program like PSP8.
Not that its overly important.. I was just wondering if anyone might know the cause of the problem, and how i might go about fixing it.
It might be that the DCT (discrete cosine transform, iirc - anyway, the "nice and special coding" used in JPEG) has been implemented lossily. I believe intel released an okay fast MMX iDCT... which had some quality problems. Unfortunately, this code crept into a whole bunch of projects.
I could of course be totally wrong, too - don't have any references handy, sorry.
Might also be something as simple as the 'quality' parameter being set low for the delphi code?
I could of course be totally wrong, too - don't have any references handy, sorry.
Might also be something as simple as the 'quality' parameter being set low for the delphi code?
Im assuming that it is something in the DCT - most probably the fact that I truncate from floating-point to integer quite early in the piece.
All my code is from scratch, and slow as hell to ensure that its correct - which it seems to be. Might try slowing it more by using all floating point code to see if it maintains better detail.
Thanks Fodder
All my code is from scratch, and slow as hell to ensure that its correct - which it seems to be. Might try slowing it more by using all floating point code to see if it maintains better detail.
Thanks Fodder