< prev index next >

src/java.desktop/unix/native/libmlib_image/mlib_v_ImageAffine_BL.c

Print this page
rev 14292 : remove Index

@@ -31,11 +31,10 @@
  *
  */
 
 #include "vis_proto.h"
 #include "mlib_image.h"
-#include "mlib_ImageColormap.h"
 #include "mlib_ImageCopy.h"
 #include "mlib_ImageAffine.h"
 #include "mlib_v_ImageFilters.h"
 #include "mlib_v_ImageChannelExtract.h"
 

@@ -717,136 +716,5 @@
 
   return MLIB_SUCCESS;
 }
 
 /***************************************************************/
-#define LUT(x)  plut[x]
-
-mlib_status FUN_NAME(u8_i)(mlib_affine_param *param,
-                           const void        *colormap)
-{
-  DECLAREVAR();
-  mlib_s32 nchan   = mlib_ImageGetLutChannels(colormap);
-  mlib_s32 lut_off = mlib_ImageGetLutOffset(colormap);
-  mlib_f32 *plut = (mlib_f32*)mlib_ImageGetLutNormalTable(colormap) - lut_off;
-  mlib_s32 max_xsize = param -> max_xsize;
-  mlib_f32 buff[BUF_SIZE], *pbuff = buff;
-
-  if (max_xsize > BUF_SIZE) {
-    pbuff = mlib_malloc(max_xsize*sizeof(mlib_f32));
-
-    if (pbuff == NULL) return MLIB_FAILURE;
-  }
-
-  vis_write_gsr(3 << 3);
-
-  for (j = yStart; j <= yFinish; j++) {
-    mlib_f32 s0, s1, s2, s3;
-    DTYPE    *sp;
-
-    NEW_LINE(1);
-
-#pragma pipeloop(0)
-    for (i = 0; i < size; i++) {
-      GET_FILTER_XY();
-
-      sp = *(DTYPE**)((mlib_u8*)lineAddr + PTR_SHIFT(Y)) + (X >> MLIB_SHIFT);
-      s0 = LUT(sp[0]);
-      s1 = LUT(sp[1]);
-      s2 = LUT(sp[srcYStride]);
-      s3 = LUT(sp[srcYStride + 1]);
-
-      PROCESS_4CH(s0, s1, s2, s3);
-
-      pbuff[i] = vis_fpack16(dd);
-      X += dX;
-      Y += dY;
-    }
-
-    if (nchan == 3) {
-      mlib_ImageColorTrue2IndexLine_U8_U8_3_in_4((void*)pbuff, (void*)dl, size, colormap);
-    } else {
-      mlib_ImageColorTrue2IndexLine_U8_U8_4((void*)pbuff, (void*)dl, size, colormap);
-    }
-  }
-
-  if (pbuff != buff) {
-    mlib_free(pbuff);
-  }
-
-  return MLIB_SUCCESS;
-}
-
-/***************************************************************/
-#undef  DTYPE
-#define DTYPE mlib_s16
-
-mlib_status FUN_NAME(s16_i)(mlib_affine_param *param,
-                            const void        *colormap)
-{
-  DECLAREVAR();
-  mlib_s32 nchan   = mlib_ImageGetLutChannels(colormap);
-  mlib_s32 lut_off = mlib_ImageGetLutOffset(colormap);
-  mlib_f32 *plut = (mlib_f32*)mlib_ImageGetLutNormalTable(colormap) - lut_off;
-  mlib_s32 max_xsize = param -> max_xsize;
-  mlib_f32 buff[BUF_SIZE], *pbuff = buff;
-
-  srcYStride /= sizeof(DTYPE);
-
-  if (max_xsize > BUF_SIZE) {
-    pbuff = mlib_malloc(max_xsize*sizeof(mlib_f32));
-
-    if (pbuff == NULL) return MLIB_FAILURE;
-  }
-
-  vis_write_gsr(3 << 3);
-
-  for (j = yStart; j <= yFinish; j++) {
-    mlib_f32 s0, s1, s2, s3;
-    DTYPE    *sp;
-
-    NEW_LINE(1);
-
-#pragma pipeloop(0)
-    for (i = 0; i < size; i++) {
-      GET_FILTER_XY();
-
-      sp = *(DTYPE**)((mlib_u8*)lineAddr + PTR_SHIFT(Y)) + (X >> MLIB_SHIFT);
-      s0 = LUT(sp[0]);
-      s1 = LUT(sp[1]);
-      s2 = LUT(sp[srcYStride]);
-      s3 = LUT(sp[srcYStride + 1]);
-
-      PROCESS_4CH(s0, s1, s2, s3);
-
-      pbuff[i] = vis_fpack16(dd);
-      X += dX;
-      Y += dY;
-    }
-
-    if (nchan == 3) {
-      mlib_ImageColorTrue2IndexLine_U8_S16_3_in_4((void*)pbuff, (void*)dl, size, colormap);
-    } else {
-      mlib_ImageColorTrue2IndexLine_U8_S16_4((void*)pbuff, (void*)dl, size, colormap);
-    }
-  }
-
-  if (pbuff != buff) {
-    mlib_free(pbuff);
-  }
-
-  return MLIB_SUCCESS;
-}
-
-/***************************************************************/
-const type_affine_i_fun mlib_AffineFunArr_bl_i[] = {
-  mlib_ImageAffine_u8_u8_i_bl,
-  mlib_ImageAffine_u8_u8_i_bl,
-  mlib_ImageAffine_u8_s16_i_bl,
-  mlib_ImageAffine_u8_s16_i_bl,
-  mlib_ImageAffine_s16_u8_i_bl,
-  mlib_ImageAffine_s16_u8_i_bl,
-  mlib_ImageAffine_s16_s16_i_bl,
-  mlib_ImageAffine_s16_s16_i_bl
-};
-
-/***************************************************************/
< prev index next >