qizhrj / openjpeg

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

Refactor j2k_read_ppm_v3 function #470

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
While fixing issue 392, it appeared that function j2k_read_ppm_v3 should be 
refactored (and renamed) in the following way : 

while reading the MH (in opj_j2k_read_header_procedure), concatenate all Nppm 
and corresponding Ippm's and parse them all at once, once getting out of the 
while loop of the MH processing. This would allow the processing of ppm data in 
the right order (if by any chance Zppm are not in increasing order) and would 
avoid the need of adding a parameter to all marker handlers to fix the ASan 
error with x64 (see issue 392).

Sanity checks at
https://code.google.com/p/openjpeg/source/browse/trunk/src/lib/openjp2/j2k.c?r=2
963#3600
https://code.google.com/p/openjpeg/source/browse/trunk/src/lib/openjp2/j2k.c?r=2
963#3644
might need to be removed too.

Original issue reported on code.google.com by antonin on 15 Jan 2015 at 5:39