From 7092f7ea112fcc44e7426c462bf01a406b076620 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 23 May 2016 16:00:04 +0200 Subject: [PATCH] Fix MSVC210 build issue (use of C99 declaration after statement) introduced in ba1edf6cd41415594729bc90ad3b0008af48251e --- src/lib/openjp2/t1.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/openjp2/t1.c b/src/lib/openjp2/t1.c index 277261d7..e1097bf5 100644 --- a/src/lib/openjp2/t1.c +++ b/src/lib/openjp2/t1.c @@ -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) {