AnsweredAssumed Answered

Decoding (possible) ADV202 generated stream with software

Question asked by fredliporace on Jun 26, 2018
Latest reply on Jun 29, 2018 by fredliporace



I'm decoding a JPEG2000 stream from a source that seems to be using ADV202 to encode the data. The manufacturer simple says that the stream is 'JPEG2000 compatible', but the first bytes of every frame are the ones that define the ADV202 header, that is, FF FF FF F0 [Compressed image index], etc.


I found out that the code stream compressed image index (the 4 bytes that follow the field header FF FF FF F0) is repeated in 4 packets and then incremented, that is, the full image is divided in 4 'subimages'. Each part starts with the ADV202 field header and is followed by the JP2 id bytes (00 00 00 0C 6A 50 20 20 ) and the usual JP2/J2K markers, up to a EOC (FF D9) marker, with padding 00s later.


I'm trying to reconstruct the image by decoding the JPEG2000 in each one of the 4 packages and later combine the decoded images in a single one (the number of columns of each one of the 'subimages' is exactly 1/4 of the full image). This is not working, I'm able to decode each part but the image pattern is not what is expected - tried different decoders such as Irfanview, Kakadu and OpenJPEG2000 with the same results.


The attached image is one of these subimages decodeed, the reference is a black image, it is OK for 2/3 of the image but the rightmost 3rd is not black as expected:Decoded JPEG2000 subimage


Maybe the 4 packets must be combined somehow before decoding?


Most of the info that helped me to get this far is from this forum so thanks in advance.