Opened 15 years ago
Closed 15 years ago
#3064 closed defect (fixed)
gdaladdo fails with JPEG YCBCR when interleaving is not specified to be pixel
Reported by: | eheinz | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.2 |
Component: | GDAL_Raster | Version: | 1.6.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
gdaladdo -ro -r average --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR ...
fails with the following error messages: ERROR 1: JPEGLib:Improper call to JPEG library in state 101 Warning 1: JPEGLib:Application transferred too many scanlines
This happens with gdal-1.6.1.tar.gz and tiff-4.0.0beta3.tar.gz installed as external libtiff. The image to be processed is a 71936 x 71936 tiled geotiff with JPEG compression and photometric interpretation YCbCr (3x8 bit/pixel).
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Reproduced with :
import gdal ds = gdal.GetDriverByName('GTiff').Create('test.tif', 71936, 71936, 3, options = ['TILED=YES', 'SPARSE_OK=YES'] ) ds = None
then
gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR test.tif 2 4 8 16 32
comment:3 by , 15 years ago
Status: | new → assigned |
---|
comment:4 by , 15 years ago
Milestone: | → 1.6.2 |
---|---|
Owner: | changed from | to
Status: | assigned → new |
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | gdaladdo fails on large geotiff with JPEG compression → gdaladdo fails with JPEG YCBCR when interleaving is not specified to be pixel |
Actually, the issue doesn't come from the image being large. It comes from the fact that YCBCR uses by default subsampling, which makes it incompatible with PLANARCONFIG=SEPARATE (INTERLEAVE=BAND in GDAL terms). When building overviews, BAND interleaving was the default, so in that case of YCBCR photometry, I changed it to default to pixel interleaving.
Fixed in trunk (r17416) and branches/1.6 (r17417).
Easy workaround : explicitly add --config INTERLEAVE_OVERVIEW BAND, as suggested in http://gdal.org/gdaladdo.html
Also confirmed with :
The error message is the same as in #2748. The cure might be similar...