From 156bb5415dd9597482955b15d2a176c183672700 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sat, 9 Apr 2011 20:28:34 +0200 Subject: [PATCH] Revert "Our old crashfixes for OpenJPEG" This reverts commit 753c0b9285442d7a84e8e89bf96bbe92fa79bbc7. --- indra/libopenjpeg/t1.c | 19 +++---------------- indra/libopenjpeg/tcd.c | 5 ----- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/indra/libopenjpeg/t1.c b/indra/libopenjpeg/t1.c index 96dc5a62a..721a706c6 100644 --- a/indra/libopenjpeg/t1.c +++ b/indra/libopenjpeg/t1.c @@ -1089,27 +1089,14 @@ static double t1_getwmsedec( int numcomps, int mct) { - double w1 = 1, w2, wmsedec; - - // Prevent running an MCT on more than 3 components. NB openjpeg v2.0 will support this via - // custom MCT tables that can be passed as encode parameters, 1.3 cannot support this as it - // uses a static table of 3 entries and there for can only cope with 3 components with out an - // array overflow - - if(numcomps==3) { - if (qmfbid == 1) { - w1 = (numcomps > 1) ? mct_getnorm(compno) : 1.0; - } else { - w1 = (numcomps > 1) ? mct_getnorm_real(compno) : 1.0; - } - } - + double w1, w2, wmsedec; if (qmfbid == 1) { + w1 = (mct && numcomps==3) ? mct_getnorm(compno) : 1.0; w2 = dwt_getnorm(level, orient); } else { /* if (qmfbid == 0) */ + w1 = (mct && numcomps==3) ? mct_getnorm_real(compno) : 1.0; w2 = dwt_getnorm_real(level, orient); } - wmsedec = w1 * w2 * stepsize * (1 << bpno); wmsedec *= wmsedec * nmsedec / 8192.0; diff --git a/indra/libopenjpeg/tcd.c b/indra/libopenjpeg/tcd.c index 9504dc4b0..dc1f1111c 100644 --- a/indra/libopenjpeg/tcd.c +++ b/indra/libopenjpeg/tcd.c @@ -1407,11 +1407,6 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, op } } - if(!tilec->data) { - opj_event_msg(tcd->cinfo, EVT_ERROR, "Error decoding tile. null data\n"); - return false; - } - numres2decode = tcd->image->comps[compno].resno_decoded + 1; if(numres2decode > 0){ if (tcd->tcp->tccps[compno].qmfbid == 1) {