fixed a bug when specifying a rate '-r' => no distortion info was available in the...
authorAntonin Descampe <antonin@gmail.com>
Thu, 8 Dec 2005 14:47:40 +0000 (14:47 +0000)
committerAntonin Descampe <antonin@gmail.com>
Thu, 8 Dec 2005 14:47:40 +0000 (14:47 +0000)
ChangeLog
libopenjpeg/t2.c
libopenjpeg/tcd.c

index b067d470858e37d43c6b3b8fd4d48f0bc91219b4..ded5290cff9ded8920f7094f97f832278cb6668f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ What's New for OpenJPEG
 + : added
 
 December 8, 2005 - 1.1.1
+* [Antonin Descampe] fixed a bug when specifying a rate '-r' => no distortion info was available in the index
 * [Antonin Descampe] fixed a bug in t1_getwmsedec (stepsize was divided by 8192)
 
 December 5, 2005 - 1.1.0
index a239a0e91c1bb1892963027ac286dcf7823a4c8e..dda0efca4799a328afb464def80a02d354470103 100644 (file)
@@ -558,6 +558,10 @@ int t2_encode_packets(opj_t2_t* t2, int tileno, opj_tcd_tile_t *tile, int maxlay
                return -999;
        }
        
+       if(image_info) {
+               image_info->num = 0;
+       }
+       
        for (pino = 0; pino <= cp->tcps[tileno].numpocs; pino++) {
                while (pi_next(&pi[pino])) {
                        if (pi[pino].layno < maxlayers) {
index 92e8c9086a1f321fa0ed0ace4b1a025f826e8bd6..088065e3df7e832308cfbf8faada895f33db2320 100644 (file)
@@ -1083,7 +1083,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
                                        lo = thresh;
                                } else {
                                        l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info);
-                                       opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen);
+                                       /* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */
                                        if (l == -999) {
                                                lo = thresh;
                                                continue;