Fix MSVC210 build issue (use of C99 declaration after statement) introduced in ba1edf... 783/head
authorEven Rouault <even.rouault@spatialys.com>
Mon, 23 May 2016 14:00:04 +0000 (16:00 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Mon, 23 May 2016 14:00:28 +0000 (16:00 +0200)
src/lib/openjp2/t1.c

index 277261d76dac8db06e56de77e075ce21e363ba9a..e1097bf5bed8c7ed6d4ff1881af842bf3f42c732 100644 (file)
@@ -1650,13 +1650,13 @@ static OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1,
        opj_raw_t *raw = t1->raw;       /* RAW component */
        opj_mqc_t *mqc = t1->mqc;       /* MQC component */
        
-       mqc->lut_ctxno_zc_orient = lut_ctxno_zc + orient * 256;
-
        OPJ_INT32 bpno_plus_one;
        OPJ_UINT32 passtype;
        OPJ_UINT32 segno, passno;
        OPJ_BYTE type = T1_TYPE_MQ; /* BYPASS mode */
 
+       mqc->lut_ctxno_zc_orient = lut_ctxno_zc + orient * 256;
+
        if(!opj_t1_allocate_buffers(
                                t1,
                                (OPJ_UINT32)(cblk->x1 - cblk->x0),
@@ -1903,7 +1903,6 @@ static void opj_t1_encode_cblk(opj_t1_t *t1,
        OPJ_FLOAT64 cumwmsedec = 0.0;
 
        opj_mqc_t *mqc = t1->mqc;       /* MQC component */
-       mqc->lut_ctxno_zc_orient = lut_ctxno_zc + orient * 256;
 
        OPJ_UINT32 passno;
        OPJ_INT32 bpno;
@@ -1914,6 +1913,8 @@ static void opj_t1_encode_cblk(opj_t1_t *t1,
        OPJ_BYTE type = T1_TYPE_MQ;
        OPJ_FLOAT64 tempwmsedec;
 
+       mqc->lut_ctxno_zc_orient = lut_ctxno_zc + orient * 256;
+
        max = 0;
        for (i = 0; i < t1->w; ++i) {
                for (j = 0; j < t1->h; ++j) {