-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support files with very large data size #730
Conversation
The modified code in |
CI fails on some hosts when running the tests for issue #432. I think this must be fixed by updating the test code. As I am not familiar with My test result is available here: http://my.cdash.org/buildSummary.php?buildid=933150 (how can I set the build name?). |
Updated PR, test for issue #432 is now temporarily disabled. |
Ping? What is needed to get large file support integrated? The PR was now re-based on latest git version. |
@stweil, there are many places throughout the code where data is allocated with UINT32 size, or operations are performed on 32-bits size width * height. |
The limit which is addressed by this PR is width * height * 4 < 32 bit or width * height < 1073741824. I did not find more code with the same limit. Of course there are other code locations with different limitations, for example width * height < 32 bit. Maybe someone has a test image between those two limits, so we could test whether the new code works? |
I recently ran into the same issue. Is there any way to move this forward ? |
@jmichel-otb, the current question is whether this pull request alone is useful or not. There are code limitations which are not fixed here, so a general solution for large files needs more changes. If you have a valid example where this pull request helps, I think it will be applied. Maybe you can provide your example then for the test cases? |
Well, what I can do is check if this branch fixes my problem. The test data is quite large (more than 4 Gb) and I think I can not give it away, but maybe I can generate a similar dataset. Nevertheless, I can also try to solve the other code limitations. |
Checking would be great. Solving more code limitations would be even better. What are your image dimensions (width, height)? |
I need to check because I do not have the image here, but it was roughly 40 000 x 160 000 pixels, so bigger than the width * height < 1073741824 limit. |
For the old timers, there used to be a script for generating such images in SVN: https://groups.google.com/forum/#!msg/openjpeg/zGAIlZgxePE/Jx3L3y2u1kYJ |
I rebased this pull request now to latest git master. |
PR rebased again to fix merge conflicts. |
It would be great to have large file support for OpenJPEG! FWIW, I get a warning when building the
|
The maximum supported data size is a limiting factor for the maximum size of allowed images. As it is possible to allocate size_t bytes, this data type must also be used for the data size. This modification also fixes issue uclouvain#432. That file is now decoded on 64 bit hosts with enough RAM, so the regression test had to be fixed. Until it is possible to use different test cases for 32 and 64 bit hosts, the test for issue uclouvain#432 is disabled. Handle also a potential division by zero when l_data_size is 0. This fixes issue uclouvain#733. Update also some comments in the test suite. Signed-off-by: Stefan Weil <[email protected]>
Pull request was rebased again, and warnings are fixed now. |
This PR would only help for cases where number of pixels in tiles is < 4 billion. I'll integrate that, as well as other needed changes, in ongoing work for subtile decoding (not merging that right now to avoid merge conflicts) |
@pedros007 Yes, exactly. This PR is included in d5153ba , 008a12d and 98b9310 of #1010 |
Nice indeed, and good to see those improvements. @rouault, maybe you can also replace the error message |
…ile data exceeds system limits' (refs uclouvain#730 (comment))
…ile data exceeds system limits' (refs uclouvain#730 (comment))
#1010 has just been merged. This obsoletes this PR |
Jasper failed to read a large jp2 file & OpenJPEG will get large file support. @rouault is making more OpenJPEG improvements, [including support for files with > 4 billion pixels](uclouvain/openjpeg#730 (comment)). Build against OpenJPEG master. Eventually it may work with the jp2 files I have.
The maximum supported data size is a limiting factor for the maximum
size of allowed images. As it is possible to allocate size_t bytes,
this data type must also be used for the data size.
This modification also fixes issue #432. That file is now decoded on
64 bit hosts with enough RAM, so the regression test had to be fixed.
Update also some comments in the test suite.
Signed-off-by: Stefan Weil [email protected]