openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

maxOneCqccPerComponent and maxOneCcocPerComponent are overly restrictive #212

Closed bitsgalore closed 8 months ago

bitsgalore commented 8 months ago

Test with HTJ2K reference software brought up files that failed validation with "maxOneCqccPerComponent", details below:

https://github.com/openpreserve/jpylyzer-test-files/issues/9#issuecomment-1769002723

On closer inspection this test seems to be based on a misinterpretation of clause A.6.5.

Same applies to the "maxOneCcocPerComponent" test (clause A.6.2).

Solution: split out each of the above tests into 2 separate tests that check uniqueness of Cqcc / Ccoc values within main and tile-part headers, respectively. So for each unique isot value (=tile index), we need to take corresponding tile-part with tpsot value 0 (=first tile part of that tile).

bitsgalore commented 8 months ago

Fixed as per following changes:

https://github.com/openpreserve/jpylyzer/commit/f426d924ac098efafa42401ac016ca70618f7d07

Tile-part level checks are done irrespective of whether tile-part is first tile-part of a tile or not. So we need this additional check:

https://github.com/openpreserve/jpylyzer/issues/213