Mercurial > hg > wm
diff Meerwald/dwt.c @ 14:1906e659edd0
fix undef. behaviour
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Mon, 30 Jun 2008 15:46:32 +0200 |
parents | f83ef905a63d |
children |
line wrap: on
line diff
--- a/Meerwald/dwt.c Mon Jun 30 15:43:16 2008 +0200 +++ b/Meerwald/dwt.c Mon Jun 30 15:46:32 2008 +0200 @@ -156,13 +156,15 @@ filter[k] = tf[j--] / 2.0; break; case FILTERG: - filter[k] = (double) (((i & 0x01) * 2) - 1) * tf[i++] / 2.0; + filter[k] = (double) (((i & 0x01) * 2) - 1) * tf[i] / 2.0; + i++; break; case FILTERHi: filter[k] = tf[j--]; break; case FILTERGi: - filter[k] = (double) (((i & 0x01) * 2) - 1) * tf[i++]; + filter[k] = (double) (((i & 0x01) * 2) - 1) * tf[i]; + i++; break; default: return -1; @@ -278,7 +280,8 @@ switch (which) { case FILTERG: case FILTERGi: - filter[k] = (double) ((((i+1) & 0x01) * 2) - 1) * tf[i++]; + filter[k] = (double) ((((i+1) & 0x01) * 2) - 1) * tf[i]; + i++; break; case FILTERH: case FILTERHi: