Hello Bill, Mathieu

The maxmemory and JPEGMEM settings can only work when libjpeg
has an alternative to use temporary files instead of RAM.
But on modern systems libjpeg is usually installed with the
"jmemnobs.c" (no backing store) memory module, and then these
settings are not regarded, because libjpeg has no alternative.

You would have to configure libjpeg with something like
"jmemansi.c" to make use of these settings.
But this would have a disadvantage and thus isn't recommended
for normal systems because actually the libjpeg memory management
isn't capable to use all of available RAM when the backing store
mechanism is enabled - you would always be limited to a predefined
maximum setting.
Unfortunately there is no benefit of libjpeg8 over libjpeg62 here
- nothing was changed there.  I know about this deficiency, but
actually couldn't revise the memory management because there are
currently more important things to do for me.

$ cjpeg -progressive -maxmemory 4m -outfile huge1.jpg  huge.ppm

while
$ cjpeg -maxmemory 4m -outfile huge1.jpg  huge.ppm

does not use much memory

Of course this is a huge difference for libjpeg processing because
"-progressive" has to buffer the whole image as DCT coefficient
array as opposed to the sequential processing.

$ cjpeg -progressive -arithmetic -rgb -block 1 -outfile huge1.jpg -quality 100 
huge.ppm

And this is even worse because in the current implementation "-block 1"
treats every sample as a full 8x8 DCT coefficient block.  If you want to
push libjpeg to its extreme regarding memory consumption then something
like this is indeed the way to go.
This is also the reason why I always recommend "-arithmetic" together
with "-rgb -block 1" for lossless coding.
Without the "-arithmetic", cjpeg would use Huffman optimization (default
for progressive and for block sizes < 8) with full image DCT buffer.
The only practical reason why one would want to use above command would
be to benefit from the successive approximation which is used for the
DC coefficients in the default progressive script.
But as said this has a huge effect on memory consumption.

Ciao
Guido



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to