mansoor-ahmed / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

[V2 branch] Regression : fails if Psot is equal to zero #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

When reading SOT marker from a j2k codestream, the decoder fails if the total 
length of the tile-part is 0 (Psot parameter).

However, ISO-IEC 15444-1 (J2K part-1), section A.4.2. says :

---
Psot : Length, in bytes, from the beginning of the first byte of this SOT 
marker segment of the tile-part to the end of the data of that tile-part. 
Figure A-16 shows this alignment. Only the last tile-part in the codestream may 
contain a 0 for Psot. If the Psot is 0, this tile-part is assumed to contain 
all data until the EOC marker.

---

So, decoder should not throw an error and continue, assuming that Psot is equal 
to the number of bytes left in the codestream, until EOC (as done in 1.x).

see https://groups.google.com/d/topic/openjpeg/ivX3nPnYo30/discussion

Original issue reported on code.google.com by antonin on 13 Jan 2011 at 3:12

Attachments:

GoogleCodeExporter commented 9 years ago
Cannotreaddatawithnosizeknown.j2k is now part of the test suite and has been 
run successufully since release 2.0.0. No regression is possible. Closing.

Original comment by mathieu.malaterre on 25 Feb 2014 at 10:38