AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2010.12.22 16:20 "[ANNOUNCE]: LZMA2 codec", by Andrey Kiselev
2010.12.23 00:38 "Re: [ANNOUNCE]: LZMA2 codec", by Scott Ribe
2010.12.23 10:57 "Re: [ANNOUNCE]: LZMA2 codec", by Andrey Kiselev
2010.12.23 12:23 "Re: [ANNOUNCE]: LZMA2 codec", by Even Rouault
2010.12.23 13:59 "Re: [ANNOUNCE]: LZMA2 codec", by Andrey Kiselev
2010.12.23 18:29 "Re: [ANNOUNCE]: LZMA2 codec", by Even Rouault

2010.12.23 12:23 "Re: [ANNOUNCE]: LZMA2 codec", by Even Rouault

Andrey,

I've integrated successfully the LZMA codec in GDAL GeoTIFF driver, but I have
noticed one issue. I don't manage to control the size of the resulting file by
changing the value of the TIFFTAG_LZMAPRESET tag. My analysis showed that
LZMAVSetField() only calls lzma_lzma_preset() with the passed preset value if we
are in the LSTATE_INIT_ENCODE state. But this state is only set by
LZMASetupEncode(), which as far as I can see is called at the time of the first
TIFFWriteScanline(), TIFFWriteEncodedTile() or TIFFWriteEncodedStrip(). The GDAL
driver tries to set the preset value much more early, like what is done with the
TIFFTAG_ZIPQUALITY or TIFFTAG_JPEGQUALITY that control similar parameters for
LZW and JPEG compression. So the value is ignored. Do I miss something or
shouldn't the lzma_lzma_preset(&sp->opt_lzma, sp->preset); call be moved from
LZMAVSetField() to LZMAPreEncode() ?

Best regards,

Even