Opened 7 years ago

Closed 7 years ago

#5701 closed defect (fixed)

gdaladdo -r average gives different results on a compressed RGBA TIFF vs uncompressed

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.11.2
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: overview
Cc:

Description

In the uncompressed case, overviews are regenerated by GDALRegenerateOverviews() that takes one band at the time, whereas in the compressed case they are regenerated by GDALRegenerateOverviewsMultiBand() (it computes blocks by blocks, and all bands for a block, to avoid partial writes of blocks that will lead to lost space in the TIFF) When several overview levels are specified, GDALRegenerateOverviews() generally tries to cascade them, except when there's a mask band associated with the band, because it doesn't know if the overview of the mask band have been regenerated before (and when the mask band is an alpha band, they are actually generated afterwards). So in the case, it will compute overview of factor 4 and 8 from the main resolution and not from the immediately previous level. Whereas GDALRegenerateOverviewsMultiBand() can cascade. Hence the difference. For average, we could actually use GDALRegenerateOverviewsMultiBand() (it doesn't deal with some estoric cases like AVERAGE_BIT2GRAYSCALE or AVERAGE_MP) in the non-compressed case too.

Change History (1)

comment:1 Changed 7 years ago by Even Rouault

Milestone: 1.11.2
Resolution: fixed
Status: newclosed

trunk r27876 "GTiff internal overviews: for near, average, gauss and cubic, and pixel interleaving, make sure to use the same code path for compressed vs uncompressed overviews (#5701)"

branches/1.11 r27877 "GTiff internal overviews: for near, average, gauss, and pixel interleaving, make sure to use the same code path for compressed vs uncompressed overviews (#5701)"

Note: See TracTickets for help on using tickets.