Patch by Callum Lerwick. The opj_tcd_cblk array is one of the largest allocations...
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Nov 2007 10:52:02 +0000 (10:52 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Nov 2007 10:52:02 +0000 (10:52 +0000)
commit010ae27471655e3fe05912bd9965245a4f2cd7f3
tree5799bb0c4d6b0a1c26e842a7f0c6ece5276724b9
parent24e189e4d8a231e7273d788b2bd77e2484cec761
Patch by Callum Lerwick. The opj_tcd_cblk array is one of the largest allocations, because it  contains a bunch of static buffers. This also makes it a major source of cache thrashing. This patch allocates the buffers from the heap, and dynamically sizes them in the decoder. I have not yet managed to dynamically size  them in the encoder, getting the decoder to do it was tricky enough... I also split opj_tcd_cblk_t into separate encode and decode versions. A lot of fields were not used by both, so this cuts its size even further.
ChangeLog
libopenjpeg/t1.c
libopenjpeg/t2.c
libopenjpeg/tcd.c
libopenjpeg/tcd.h