Merge commit '22e18ea39e371030cc78973d1b46aae45a7ea215'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 14:36:05 +0000 (16:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 14:36:05 +0000 (16:36 +0200)
* commit '22e18ea39e371030cc78973d1b46aae45a7ea215':
  jpeg2000: Optimize output sample conversion
  jpeg2000: Reset s->numX/Ytiles on tile deallocation
  jpeg2000: Optimize dequantization
  jpeg2000: Do not assume a single tile
  jpeg2000: Speed up jpeg2000_decode_tile()
  jpeg2000: Use EBCOT's CAUSAL and BYPASS mode in decode_cblk()

Conflicts:
libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/jpeg2000dec.c

@@@ -956,15 -960,16 +957,16 @@@ static int decode_cblk(Jpeg2000DecoderC
      for (y = 0; y < height + 2; y++)
          memset(t1->flags[y], 0, (width + 2) * sizeof(**t1->flags));
  
 +    cblk->data[cblk->length] = 0xff;
 +    cblk->data[cblk->length+1] = 0xff;
      ff_mqc_initdec(&t1->mqc, cblk->data);
 -    cblk->data[cblk->length]     = 0xff;
 -    cblk->data[cblk->length + 1] = 0xff;
  
      while (passno--) {
 -        switch (pass_t) {
 +        switch(pass_t) {
          case 0:
              decode_sigpass(t1, width, height, bpno + 1, bandpos,
-                            bpass_csty_symbol && (clnpass_cnt >= 4), vert_causal_ctx_csty_symbol);
+                            bpass_csty_symbol && (clnpass_cnt >= 4),
+                            vert_causal_ctx_csty_symbol);
              break;
          case 1:
              decode_refpass(t1, width, height, bpno + 1);
@@@ -1110,13 -1114,13 +1113,14 @@@ static int jpeg2000_decode_tile(Jpeg200
              Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno;
              /* Loop on bands */
              for (bandno = 0; bandno < rlevel->nbands; bandno++) {
 -                uint16_t nb_precincts, precno;
 +                int nb_precincts, precno;
                  Jpeg2000Band *band = rlevel->band + bandno;
                  int cblkno = 0, bandpos;
 +
                  bandpos = bandno + (reslevelno > 0);
  
-                 if (band->coord[0][0] == band->coord[0][1] || band->coord[1][0] == band->coord[1][1])
+                 if (band->coord[0][0] == band->coord[0][1] ||
+                     band->coord[1][0] == band->coord[1][1])
                      continue;
  
                  nb_precincts = rlevel->num_precincts_x * rlevel->num_precincts_y;