Description of problem: On F11 x86_64 (not tested on 32-bit), OpenJPEG produces decompressed images with massive corruption. Version-Release number of selected component (if applicable): openjpeg-1.3-4.fc11.x86_64 How reproducible: Always. Steps to Reproduce: 1. Use imagemagick to create a jp2 file (uses jasper, not openjpeg) $ convert test.ppm test.jp2 2. Verify image is good $ display test.jp2 3. Decompress with openjpeg $ j2k_to_image -i test.jp2 -o test-out.ppm 4. See the corruption $ display test-out.ppm Actual results: Corrupted image. Expected results: Correct image. Additional info: If I replace openjpeg-libs with openjpeg-libs-1.3-2.fc9.x86_64, things work. I suspect a gcc 4.4 issue.
adjusting summary. :)
I'm working on an update, and removed a hard-coded -O3 optimization, and in my preliminary tests, seems to fix the issue.
Hah, thanks for fixing the summary. If removing -O3 fixes the issue, then it may very well be something triggered by the autovectorizer in gcc 4.4. I will check to see if the bug exists on i586, which doesn't have sse2 and thus no vectorization. In theory, we want -O3 for this library, because of the benefits of vectorization.
openjpeg-1.3-5.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/openjpeg-1.3-5.fc11
openjpeg-1.3-5.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/openjpeg-1.3-5.fc10
Yeah, openjpeg-1.3-4.fc11.i586 works fine, so it's probably autovectorization.
What's your recommendation then? If a gcc bug, the gcc folk will likely want a smallish test case. Further, can we assume this is specific to F11/gcc44? I guess we have no evidence otherwise, atm.
-O2 is the way for now, some investigation of openjpeg or gcc and upstream fixes will eventually be the way.
Interesting. I've done a lot of optimization work on OpenJPEG a lot of which is upstream, extensively tested with -O3 and autovectorization enabled, and are the settings I recommend. So it really ought to work. Some of the code (like the MCT) is specifically designed to autovectorize.
openjpeg-1.3-5.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update openjpeg'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-6882
openjpeg-1.3-5.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update openjpeg'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6786
openjpeg-1.3-5.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
openjpeg-1.3-5.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.