< prev index next >

src/java.desktop/share/native/libmlib_image/mlib_ImageConvKernelConvert.c

Print this page
rev 59106 : imported patch client

@@ -59,26 +59,18 @@
 #include "mlib_image.h"
 #include "mlib_SysMath.h"
 #include "mlib_ImageConv.h"
 
 /***************************************************************/
-#ifdef __sparc
-
-#define CLAMP_S32(dst, src)                                     \
-  dst = (mlib_s32)(src)
-
-#else
 
 #define CLAMP_S32(dst, src) {                                   \
   mlib_d64 s0 = (mlib_d64)(src);                                \
   if (s0 > (mlib_d64)MLIB_S32_MAX) s0 = (mlib_d64)MLIB_S32_MAX; \
   if (s0 < (mlib_d64)MLIB_S32_MIN) s0 = (mlib_d64)MLIB_S32_MIN; \
   dst = (mlib_s32)s0;                                           \
 }
 
-#endif /* __sparc */
-
 /***************************************************************/
 JNIEXPORT
 mlib_status mlib_ImageConvKernelConvert(mlib_s32       *ikernel,
                                         mlib_s32       *iscale,
                                         const mlib_d64 *fkernel,

@@ -148,19 +140,14 @@
 
       return MLIB_SUCCESS;
     }
 
     /* try to round coefficients */
-#ifdef __sparc
-    scale1 = 16;                            /* shift of coefficients is 16 */
-#else
-
     if (chk_flag == 3)
       scale1 = 16;                          /* MMX */
     else
       scale1 = (type == MLIB_BYTE) ? 8 : 16;
-#endif /* __sparc */
     norm = (1u << (scale - scale1));
 
     for (i = 0; i < m * n; i++) {
       if (fkernel[i] > 0)
         ikernel[i] = (mlib_s32) (fkernel[i] * norm + 0.5);
< prev index next >