jpeg2000: Split codeblock decoding from the main tile decoding
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 11 Sep 2015 01:42:26 +0000 (03:42 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 14 Sep 2015 12:26:54 +0000 (14:26 +0200)
That loop is completely stand-alone.

libavcodec/jpeg2000dec.c

index 2aea844..4395dcd 100644 (file)
@@ -1091,7 +1091,9 @@ static void tile_codeblocks(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile)
                     Jpeg2000Prec *prec = band->prec + precno;
 
                     /* Loop on codeblocks */
-                    for (cblkno = 0; cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) {
+                    for (cblkno = 0;
+                         cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height;
+                         cblkno++) {
                         int x, y;
                         Jpeg2000Cblk *cblk = prec->cblk + cblkno;
                         decode_cblk(s, codsty, &t1, cblk,