AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.03.22 17:20 "tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:03 "Re: tif_jpeg.c and 12bit JPEG Files", by Lee Howard
2005.03.22 18:17 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:33 "Re: tif_jpeg.c and 12bit JPEG Files", by Joris Van Damme
2005.03.22 18:04 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 18:10 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:22 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 20:00 "Re: tif_jpeg.c and 12bit JPEG Files", by David Gilbert
2005.03.22 20:25 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 20:38 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 21:59 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 22:28 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 22:41 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.29 11:24 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.29 16:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.04.01 08:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.22 21:19 "Re: tif_jpeg.c and 12bit JPEG Files", by Chris Cox
2005.03.22 21:36 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.31 10:04 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.22 21:37 "Re: tif_jpeg.c and 12bit JPEG Files", by Chris Losinger
2005.03.23 14:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Jeff Mather

2005.03.22 17:20 "tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam

Folks,

I am planning to commit some changes to tif_jpeg.c in CVS to support 
12bit jpeg encoded TIFF files using a new working version of the IJG
libjpeg (which we have been calling Mk1). 

In investigations, I have come to the conclusion that calling 
TIFFReadEncodedTile() to read YCbCr downsampled JPEG data
is completely broken for 8 and 12 bit JPEG encoded imagery currently.
Does anyone know any differently?  It seem that the only way to get
these working is to force libjpeg to convert to RGB on the fly by setting
TIFFTAG_JPEGCOLORMODE to JPEGCOLORMODE_RGB. 

In tif_jpeg.c direct YCbCr access is done via a set of "raw" access
functions.  But it is these that seem to be broken.  Does anyone feel
a compelling need to be able to read YCbCr downsampled raw data
from JPEG encoded TIFF files?  That is, should I also try and fix
the "raw" access while I am in here?  (no promises ... it looks yucky). 

My general intent then is to modify the tif_jpeg.c JPEGDecode()
(and likely JPEGEncode()) to support repacking 12bit data from
16 bit JSAMPLEs returned by libjpeg into packed 12bit format in
the TIFF buffer.  This seems to be the main barrier to correct operation
currently.  But there are a few other patches needed, and also the 
ability to autodetect at build time which style of libjpeg is being used.
The traditional "6b" libjpeg, or the newer "Mk1".  

BTW, the 6b libjpeg has to be built either in 8bit mode or 12bit mode.
One build of the library cannot support both forms.  The new Mk1 
library always returns samples as 16 samples and can read either
8bit or 12bit files dynamically.  

Finally, the "Mk1" library is essentially a libjpeg fork.  There is
discussion on the JPEG mailing list about how to move to a libjpeg7
with similar capabilities.  While it is likely that a libjpeg7 would take
a somewhat different approach than the Mk1 library, it is hoped that
the work being done now will help in that transition.  

Anyone interested in using the Mk1 library can contact me or Dave
Gilbert (see cc) for details. It is sitting on the same CVS server as libtiff
with a module name of "libjpeg".   Make sure to check out the mk1 tag.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent