jonathan: thuban/libraries/thuban gdalwarp.cpp,1.7,1.8
Bernhard Herzog
bh at intevation.de
Fri Feb 18 20:09:20 CET 2005
cvs at intevation.de writes:
> --- gdalwarp.cpp 16 Feb 2005 21:14:47 -0000 1.7
> +++ gdalwarp.cpp 18 Feb 2005 14:54:17 -0000 1.8
> @@ -491,11 +498,14 @@
> {
> for (j=0; j < nRasterXSize;)
> {
> -#if wxCHECK_VERSION(2,5,3)
> - if (*tptr++ >= 128) c |= b;
> -#else
> - if (*tptr++ < 128) c |= b;
> -#endif
> + if (bInvertMask)
> + {
> + if (*tptr++ < 128) c |= b;
> + }
> + else
> + {
> + if (*tptr++ >= 128) c |= b;
> + }
This is in the innermost loop. Wouldn't it be better to move the test
for bInvertMask to where c is assigned to *(ptr++)? That way the test
would only be made for every byte in the mask, not for every bit.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)