summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-11-08 14:26:03 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-11-08 14:26:03 +0000
commitc38de0728d481f1c821d9e86df960e1f1c36c04f (patch)
treeabb7fd32919c66ab8af75f5936d1035f2b3a1198 /libopenjpeg
parentb93c12564daea92200eefc596d4c438b1b00c1c4 (diff)
In t1.c, small change to avoid calling twice t1_getwmsedec()
Patch from Callum Lewick. Basic gcc optimization flags in cmake and makefile match.
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/t1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopenjpeg/t1.c b/libopenjpeg/t1.c
index d359b093..de32e55b 100644
--- a/libopenjpeg/t1.c
+++ b/libopenjpeg/t1.c
@@ -809,6 +809,7 @@ static void t1_encode_cblk(
int nmsedec = 0;
double cumwmsedec = 0.0;
char type = T1_TYPE_MQ;
+ double tempwmsedec;
opj_mqc_t *mqc = t1->mqc; /* MQC component */
@@ -851,8 +852,9 @@ static void t1_encode_cblk(
}
/* fixed_quality */
- cumwmsedec += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
- tile->distotile += t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
+ tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
+ cumwmsedec += tempwmsedec;
+ tile->distotile += tempwmsedec;
/* Code switch "RESTART" (i.e. TERMALL) */
if ((cblksty & J2K_CCP_CBLKSTY_TERMALL) && !((passtype == 2) && (bpno - 1 < 0))) {