Ticket #4340 (closed defect: fixed)

Opened 20 months ago

Last modified 18 months ago

JP2KAK: Reads from overview band returns data from the main band

Reported by: yehiyam Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: default Version: 1.8.1
Severity: normal Keywords: jp2kak kakadu jpeg2000
Cc:

Description

System: windows7 64 bit with gdal source version 1.8.1 SDK version v6.0 (v6_0-00828N)

When opening a .jp2 file with the kakadu driver (jp2kak) and trying to read a region from an overview band, the data is read from the main band.

To reproduce: Use the CSharp sample app GDALReadDirect GDALReadDirect utm.jp2 overview0.png 0

this will create an image the size of the first overview, but with the contents from the upper right quarter of the main band.

Attachments

jp2kakDataset.cpp.patch Download (13.1 KB) - added by yehiyam 20 months ago.

Change History

Changed 20 months ago by yehiyam

Changed 20 months ago by yehiyam

I've created a patch that I think resolves this issue (at least for my test cases it works fine).

Changed 18 months ago by warmerdam

  • status changed from new to assigned

I have been unable to reproduce the problem with dumpoverviews, but I see it does line by line io which skips the direct case. I'm not keen on another complete directio implementation for bands but I'm optimistic I can fix the problem at the dataset level.

Changed 18 months ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to 1.9.0

Fixed in trunk (r23582) and 1.8 branch (r23583). The problem only occurs when reading overviews directly on overview bands via the "direct" api as oppposed to through the block cache.

Note: See TracTickets for help on using tickets.