[ILUG] SDMI initiative
Colm Buckley
colm at tuatha.org
Thu Sep 28 08:37:13 IST 2000
Niall O Broin writes:
> However, JPEG uses a similar kind of compression (psycho-visual
> model ?), discarding information that the eye doesn't take much
> account of, but you will surely see the effects of repeated
> compression/decompression with JPEG.
No, you don't!
Look:
ogma$ ls -l gen0.jpg
-rw-r--r-- 1 colm users 581874 Sep 28 08:20 gen0.jpg
ogma$ for a in $(seq 0 9)
do
cjpeg -quality 80 -optimize < picture.ppm > gen$a.jpg
djpeg < gen$a.jpg > picture.ppm
done
ogma$ ls -l gen*
-rw-r--r-- 1 colm users 188828 Sep 28 08:30 gen0.jpg
-rw-r--r-- 1 colm users 188881 Sep 28 08:30 gen1.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen2.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen3.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen4.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen5.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen6.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen7.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen8.jpg
-rw-r--r-- 1 colm users 188877 Sep 28 08:30 gen9.jpg
ogma$ cmp gen2.jpg gen9.jpg
ogma$
So, there is what looks like a tiny amount of lossage with the first
two generations, and after that the file remains identical through
multiple compression/decompression cycles. I believe the JFIF encoder
is pretty standard these days, but if there were different JPEG
encoders being used at each generation, you might get more loss for
more generations, but eventually the file would either stabilise and
be unchanged by a given decompression/compression cycle, or enter a
set of stable states and alternate between them. Pretty much the same
goes for PAM-based audio compression, using ATRAC or MP3 or whatever.
Colm
--
Colm Buckley BA BF | NewWorld Commerce, 44 Westland Row, Dublin 2, Ireland
colm at tuatha.org (personal) | colm.buckley at nwcgroup.com (business)
+353 87 2469146 | whois cb3765 | http://www.tuatha.org/~colm/
You never really learn to swear until you learn to drive.
More information about the ILUG
mailing list