< prev index next >

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

Print this page
rev 49542 : 8201226: missing JNIEXPORT / JNICALL at some places in function declarations/implementations


  61  *      If the source image is single-channeled and the destination image is
  62  *      multi-channeled, then the lookup table has the same number of channels
  63  *      as the destination image:
  64  *
  65  *          dst[x][y][c] = table[c][src[x][y][0]]
  66  *
  67  *      If the source image is multi-channeled and the destination image is
  68  *      multi-channeled, with the same number of channels as the source image,
  69  *      then the lookup table will have the same number of channels as
  70  *      the source image:
  71  *
  72  *          dst[x][y][c] = table[c][src[x][y][c]]
  73  */
  74 
  75 #include "mlib_image.h"
  76 #include "mlib_ImageCheck.h"
  77 #include "mlib_ImageLookUp.h"
  78 #include "mlib_c_ImageLookUp.h"
  79 
  80 /***************************************************************/
  81 mlib_status mlib_ImageLookUp(mlib_image       *dst,
  82                              const mlib_image *src,
  83                              const void       **table)
  84 {
  85   mlib_s32   slb, dlb, xsize, ysize, nchan, ichan, bitoff_src;
  86   mlib_type  stype, dtype;
  87   void       *sa, *da;
  88 
  89   MLIB_IMAGE_CHECK(src);
  90   MLIB_IMAGE_CHECK(dst);
  91   MLIB_IMAGE_SIZE_EQUAL(src, dst);
  92   MLIB_IMAGE_CHAN_SRC1_OR_EQ(src, dst);
  93 
  94   stype = mlib_ImageGetType(src);
  95   dtype = mlib_ImageGetType(dst);
  96   ichan = mlib_ImageGetChannels(src);
  97   nchan = mlib_ImageGetChannels(dst);
  98   xsize = mlib_ImageGetWidth(src);
  99   ysize = mlib_ImageGetHeight(src);
 100   slb   = mlib_ImageGetStride(src);
 101   dlb   = mlib_ImageGetStride(dst);




  61  *      If the source image is single-channeled and the destination image is
  62  *      multi-channeled, then the lookup table has the same number of channels
  63  *      as the destination image:
  64  *
  65  *          dst[x][y][c] = table[c][src[x][y][0]]
  66  *
  67  *      If the source image is multi-channeled and the destination image is
  68  *      multi-channeled, with the same number of channels as the source image,
  69  *      then the lookup table will have the same number of channels as
  70  *      the source image:
  71  *
  72  *          dst[x][y][c] = table[c][src[x][y][c]]
  73  */
  74 
  75 #include "mlib_image.h"
  76 #include "mlib_ImageCheck.h"
  77 #include "mlib_ImageLookUp.h"
  78 #include "mlib_c_ImageLookUp.h"
  79 
  80 /***************************************************************/
  81 JNIEXPORT mlib_status JNICALL mlib_ImageLookUp(mlib_image       *dst,
  82                              const mlib_image *src,
  83                              const void       **table)
  84 {
  85   mlib_s32   slb, dlb, xsize, ysize, nchan, ichan, bitoff_src;
  86   mlib_type  stype, dtype;
  87   void       *sa, *da;
  88 
  89   MLIB_IMAGE_CHECK(src);
  90   MLIB_IMAGE_CHECK(dst);
  91   MLIB_IMAGE_SIZE_EQUAL(src, dst);
  92   MLIB_IMAGE_CHAN_SRC1_OR_EQ(src, dst);
  93 
  94   stype = mlib_ImageGetType(src);
  95   dtype = mlib_ImageGetType(dst);
  96   ichan = mlib_ImageGetChannels(src);
  97   nchan = mlib_ImageGetChannels(dst);
  98   xsize = mlib_ImageGetWidth(src);
  99   ysize = mlib_ImageGetHeight(src);
 100   slb   = mlib_ImageGetStride(src);
 101   dlb   = mlib_ImageGetStride(dst);


< prev index next >