<div dir="ltr"><div><div><div><div><div><div><div><div><div>So, it turns out to be quite complicated to re-factor the wavelet transform to only transform a sub-region<br></div>inside a single tile image.<br><br></div>I've got it working now for lossy decode, lossless decode also works but 4 units tests are broken at the moment.<br><br></div>And, I am seeing a massive increase in performance: I tested an 11000 x 14000 lossless compressed single tile RGB 8 bit image,<br></div>decoding a 1000x1000 region in the middle of the image. OpenJPEG master takes around 60 seconds to decompress, and<br></div>my branch takes 3 seconds, on my 4 year old i7.. The cores are not even half utilized, so this time should come down by at least a factor of two.<br><br></div>One remaining issue is memory allocation: still need to allocate gigabytes of memory to do this. But, this should be an easy fix over the next few weeks. <br><br></div>Will keep you all posted.<br><br></div>Cheers,<br></div>Aaron<br><div><div><div><div><br><div><div><div><div><div><div><div><div><br><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 2:49 PM, Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jan 13, 2016 at 2:40 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> So, are you saying there are actual pixel differences between encoded file<br>
> and original?<br>
<br>
</span>Yes<br></blockquote><div><br></div></span><div>I see. So, this is repeatable every time you run the test suite? And you can't reproduce<br></div><div>with opj_compress followed by opj_decompress ? <br><br></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
> > oh, so how does one make a forward struct declaration to make gcc 4.4<br>
> happy ?<br>
<br>
</span>Apparently it doesn't like to see "typedef struct foo { ... } bar"<br>
(openjpeg.h) and "typedef struct foo bar" (region_mgr.h).<br>
If openjpeg.h was "struct foo { ... }", that would work (but we cannot touch<br>
that one). Why not just including openjpeg.h in region_mgr.h to avoid the<br>
typedef redefinitions ?<br>
<span><br></span></blockquote><div><br></div></span><div>Thanks, I moves some code around and now it should compile on 4.4.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
><br>
> > Testing with 2048x2048 tiled images, with OpenMP enabled, I can see perf<br>
> > improvements.<br>
> > For example ~2s (4 vCPU) vs ~3s (openjpeg 2.1) to decode a tile.<br>
> ><br>
> > Great. So, this is good. What are your system specs, may I ask ?<br>
<br>
</span>Was on a i5 CPU 750 @ 2.67GHz, 4 GB RAM, 64bit build<br>
<span><br></span></blockquote></span><div>OK, thanks.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
> ><br>
> ><br>
> ><br>
> ><br>
> > With a single tiled 11310x17310 image with which GDAL uses the<br>
> > opj_set_decode_area() area,<br>
> > I couldn't really see the difference as the memory consumption grows to<br>
> > above 2 GB,<br>
> > which cause disk trashing on the system on which I test.<br>
><br>
> Yes, that makes sense, there is still work to be done, I guess. The wavelet<br>
> transform<br>
> needs to be modified to be more memory efficient. What size of decode area<br>
> would you<br>
> typically want to set on an image of that size ?<br>
<br>
</span>One use case could be for displaying in a desktop GIS application (QGIS for<br>
example), so the size of the display area. Let's say 2000x1000 max.<br>
<div><div><br></div></div></blockquote><div><br></div></span><div>Great, thanks for the feedback.<br><br></div><span class=""><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
><br>
><br>
> Thanks again,<br>
> Aaron<br>
><br>
><br>
> Even<br>
><br>
> > --<br>
> > Spatialys - Geospatial professional services<br>
> > <a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>