found a bug in tcd.c that was preventing to find the correct threshold in tcd_rateall...
authorAntonin Descampe <antonin@gmail.com>
Fri, 22 Aug 2008 16:18:17 +0000 (16:18 +0000)
committerAntonin Descampe <antonin@gmail.com>
Fri, 22 Aug 2008 16:18:17 +0000 (16:18 +0000)
ChangeLog
libopenjpeg/tcd.c

index 1d7fa42d87cb75dde1977f01d64b0494096a9243..70b61563573b71ab732af62668f74c969f5a9ea3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+August 21, 2008
+* [antonin] found a bug in tcd.c that was preventing to find the correct threshold in tcd_rateallocate.c for high-precision images. Applied a temporary patch but a better solution should be found.
+
 August 21, 2008
 * [antonin] fixed a bug in image_to_j2k.c that was preventing the 'r' option to work properly (everything was compressed lossless regardless of the specified rate).
 
index 01ee3950f04d397ee405f9cf0d2eb4717f23aea4..7f154f4b03e7bddfdaf43415331b4a16415b1662 100644 (file)
@@ -1094,7 +1094,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestre
                        opj_t2_t *t2 = t2_create(tcd->cinfo, tcd->image, cp);
                        double thresh = 0;
 
-                       for (i = 0; i < 32; i++) {
+                       for (i = 0; i < 128; i++) {
                                int l = 0;
                                double distoachieved = 0;       /* fixed_quality */
                                thresh = (lo + hi) / 2;