What steps will reproduce the problem?
1. Compile the attached program against r2997 and patches 254 + 447
2 Run the program with the attached 0.jp2 file. ./jp2tile 0.jp2
What is the expected output?
See the pgm. The first tile (upper right corner) is correct the other tiles
are wrong.
What version of the product are you using? On what operating system?
cvs r2997 + patches 254 + 447. If only r2997 also the first tile is bad
When running the program with valgrind there is an error about access of
an uninitialized variable. this might cause a problem.
==16781== Invalid read of size 4
==16781== at 0x417CC1: opj_j2k_get_tile (j2k.c:9870)
==16781== by 0x41F010: opj_jp2_get_tile (jp2.c:2744)
==16781== by 0x404043: opj_get_decoded_tile (openjpeg.c:511)
==16781== by 0x4015CF: main (jp2tile.c:274)
==16781== Address 0x4d2c518 is 24 bytes before a block of size 34,080 alloc'd
==16781== at 0x4A057BB: calloc (vg_replace_malloc.c:593)
==16781== by 0x4066AD: opj_j2k_read_siz (j2k.c:2220)
==16781== by 0x4113E3: opj_j2k_read_header_procedure (j2k.c:7288)
==16781== by 0x4116B1: opj_j2k_exec (j2k.c:7356)
==16781== by 0x4103B7: opj_j2k_read_header (j2k.c:6851)
==16781== by 0x41EA0F: opj_jp2_read_header (jp2.c:2560)
==16781== by 0x403D39: opj_read_header (openjpeg.c:391)
==16781== by 0x40146C: main (jp2tile.c:245)
==16781==
Line 9870
9866 for (compno=0; compno < p_image->numcomps; ++compno)
9867 {
9868 OPJ_INT32 l_comp_x1, l_comp_y1;
9869
9870 l_img_comp->factor = p_j2k->m_private_image->comps[compno] .factor;
9871
9872 l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_ image->x0, (OPJ_INT32)l_img_comp->dx);
Original issue reported on code.google.com by hjpries...@gmail.com on 30 Mar 2015 at 12:25
Original issue reported on code.google.com by
hjpries...@gmail.com
on 30 Mar 2015 at 12:25Attachments: