Bug fixed in MQ decoder initialization (keyword comment : initbug1)
authorAntonin Descampe <antonin@gmail.com>
Wed, 21 Jul 2004 05:18:57 +0000 (05:18 +0000)
committerAntonin Descampe <antonin@gmail.com>
Wed, 21 Jul 2004 05:18:57 +0000 (05:18 +0000)
libopenjpeg/mqc.c

index 511284cebb9a83ee00211e33ae8a20ce756996dc..31adc845a7edef197bdd292fc7699afc48d6e9d0 100644 (file)
@@ -536,7 +536,10 @@ void mqc_init_dec(unsigned char *bp, int len)
   mqc_start = bp;
   mqc_end = bp + len;
   mqc_bp = bp;
-  mqc_c = *mqc_bp << 16;
+  //add antonin initbug1
+  if (len==0) mqc_c = 0xff << 16;
+  else mqc_c = *mqc_bp << 16;
+  //dda
   mqc_bytein();
   mqc_c <<= 7;
   mqc_ct -= 7;