diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2000-03-30 06:55:26 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2000-03-30 06:55:26 +0000 |
commit | 832c70934e60fcfa3c645167e3b2f5b3b1efd574 (patch) | |
tree | 384a298fc31940189ca7568758c82b3df5f76518 | |
parent | e8cd9d9a0f496c0b345cf0725b50e6e98c510941 (diff) | |
download | ghostpdl-832c70934e60fcfa3c645167e3b2f5b3b1efd574.tar.gz |
Fixes a couple of typos in the recently checked-in image interpolation fix.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@219 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/src/siscale.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gs/src/siscale.c b/gs/src/siscale.c index e3dc7103f..23b3810d9 100644 --- a/gs/src/siscale.c +++ b/gs/src/siscale.c @@ -60,6 +60,7 @@ typedef int AccumTmp; #define fixedScaleFactor ((int) (1 << numScaleBits)) #define scale_PixelWeight(factor) ((int)((factor) * (1 << num_weight_bits))) #define unscale_AccumTmp(atemp, fraction_bits) arith_rshift(atemp, fraction_bits) +#define NEED_FRACTION_BITS #else /* USE_FPU > 0 */ @@ -72,6 +73,7 @@ typedef double AccumTmp; #define fixedScaleFactor 1 /* Straight scaling for floating point */ #define scale_PixelWeight(factor) (factor) #define unscale_AccumTmp(atemp, fraction_bits) ((int)(atemp)) +/*#undef NEED_FRACTION_BITS*/ #endif /* USE_FPU */ @@ -300,8 +302,10 @@ zoom_x(PixelTmp * tmp, const void /*PixelIn */ *src, int sizeofPixelIn, const CONTRIB * items) { int c, i; -#define fraction_bits\ - ((maxSizeofPixel - sizeof(PixelTmp)) * 8 + num_weight_bits) +#ifdef NEED_FRACTION_BITS + const int fraction_bits = + (sizeofPixelIn - sizeof(PixelTmp)) * 8 + num_weight_bits; +#endif for (c = 0; c < Colors; ++c) { PixelTmp *tp = tmp + c; @@ -349,7 +353,6 @@ zoom_x(PixelTmp * tmp, const void /*PixelIn */ *src, int sizeofPixelIn, } if_debug0('W', "\n"); } -#undef fraction_bits } @@ -369,8 +372,10 @@ zoom_y(void /*PixelOut */ *dst, int sizeofPixelOut, uint MaxValueOut, const CONTRIB *cbp = items + contrib->index; int kc; PixelTmp2 max_weight = MaxValueOut; -#define fraction_bits\ - ((sizeof(PixelTmp) - sizeofPixelOut) * 8 + num_weight_bits) +#ifdef NEED_FRACTION_BITS + const int fraction_bits = + (sizeof(PixelTmp) - sizeofPixelOut) * 8 + num_weight_bits; +#endif if_debug0('W', "[W]zoom_y: "); @@ -396,7 +401,6 @@ zoom_y(void /*PixelOut */ *dst, int sizeofPixelOut, uint MaxValueOut, zoom_y_loop(bits16) } if_debug0('W', "\n"); -#undef fraction_bits } /* ------ Stream implementation ------ */ |