jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c
author ohair
Tue, 28 Dec 2010 15:53:50 -0800
changeset 7668 d4a77089c587
parent 6814 c6e347fb5b20
permissions -rw-r--r--
6962318: Update copyright year Reviewed-by: xdono
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 6814
diff changeset
     2
 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * FUNCTION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *      mlib_ImageLookUp_U8D64 - table lookup
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 *      mlib_ImageLookUp_S16D64 - table lookup
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 *      mlib_ImageLookUp_U16D64 - table lookup
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 *      mlib_ImageLookUp_S32D64 - table lookup
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * SYNOPSIS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *      void mlib_ImageLookUp_U8_D64(src, slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *                                   dst, dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 *                                   xsize, ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *                                   csize, table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *      void mlib_ImageLookUp_S16_D64(src, slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *                                    dst, dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 *                                    xsize, ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 *                                    csize, table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *      void mlib_ImageLookUp_U16_D64(src, slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *                                    dst, dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 *                                    xsize, ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 *                                    csize, table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 *      void mlib_ImageLookUp_S32_D64(src, slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *                                    dst, dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *                                    xsize, ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *                                    csize, table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * ARGUMENT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *      src     pointer to input image (BYTE, SHORT, USHORT, INT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *      slb     stride of input image (in pixels)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 *      dst     pointer to output image (DOUBLE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *      dlb     stride of output image (in pixels)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *      xsize   image width
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *      ysize   image height
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *      csize   number of channels
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *      table   lookup table
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * DESCRIPTION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 *      dst = table[src] (c, vis version)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#include "mlib_image.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#include "mlib_ImageLookUp.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#define MLIB_C_IMAGELOOKUP(DTYPE, STYPE, TABLE)                 \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
{                                                               \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
  mlib_s32 i, j, k;                                             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
  if (xsize < 2) {                                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    for(j = 0; j < ysize; j++, dst += dlb, src += slb){         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
      for(k = 0; k < csize; k++) {                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        DTYPE *da = dst + k;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        const STYPE *sa = src + k;                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        DTYPE *tab = (DTYPE*) TABLE[k];                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        for(i = 0; i < xsize; i++, da += csize, sa += csize)    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        *da=tab[*sa];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
      }                                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    }                                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  } else {                                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    for(j = 0; j < ysize; j++, dst += dlb, src += slb) {        \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
      for(k = 0; k < csize; k++) {                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        DTYPE *da = dst + k;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        const STYPE *sa = src + k;                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        DTYPE *tab = (DTYPE*) TABLE[k];                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        mlib_s32 s0, s1;                                        \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        DTYPE t0, t1;                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        s0 = (mlib_s32)sa[0];                                   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        s1 = (mlib_s32)sa[csize];                               \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        sa += 2*csize;                                          \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        for(i = 0;                                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
            i < xsize - 3;                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            i+=2, da += 2*csize, sa += 2*csize) {               \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
          t0 = tab[s0];                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
          t1 = tab[s1];                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
          s0 = (mlib_s32)sa[0];                                 \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
          s1 = (mlib_s32)sa[csize];                             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
          da[0] = (DTYPE)t0;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
          da[csize] = (DTYPE)t1;                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        }                                                       \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        t0 = tab[s0];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        t1 = tab[s1];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        da[0] = (DTYPE)t0;                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        da[csize] = (DTYPE)t1;                                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        if (xsize & 1) da[2*csize] = tab[sa[0]];                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
      }                                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    }                                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
  }                                                             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#define MLIB_C_IMAGELOOKUPSI(DTYPE, STYPE, TABLE)               \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
{                                                               \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
  mlib_s32 i, j, k;                                             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  if (xsize < 2) {                                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    for(j = 0; j < ysize; j++, dst += dlb, src += slb){         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
      for(k = 0; k < csize; k++) {                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        DTYPE *da = dst + k;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        const STYPE *sa = (void *)src;                                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        DTYPE *tab = (DTYPE*) TABLE[k];                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        for(i = 0; i < xsize; i++, da += csize, sa ++)          \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        *da=tab[*sa];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
      }                                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    }                                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
  } else {                                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    for(j = 0; j < ysize; j++, dst += dlb, src += slb) {        \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
      for(k = 0; k < csize; k++) {                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        DTYPE *da = dst + k;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        const STYPE *sa = (void *)src;                                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        DTYPE *tab = (DTYPE*) TABLE[k];                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        mlib_s32 s0, s1;                                        \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        DTYPE t0, t1;                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        s0 = (mlib_s32)sa[0];                                   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        s1 = (mlib_s32)sa[1];                                   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        sa += 2;                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
                                                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        for(i = 0;                                              \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            i < xsize - 3;                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            i+=2, da += 2*csize, sa += 2) {                     \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
          t0 = tab[s0];                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
          t1 = tab[s1];                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
          s0 = (mlib_s32)sa[0];                                 \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
          s1 = (mlib_s32)sa[1];                                 \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
          da[0] = (DTYPE)t0;                                    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
          da[csize] = (DTYPE)t1;                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        }                                                       \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        t0 = tab[s0];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        t1 = tab[s1];                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        da[0] = (DTYPE)t0;                                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        da[csize] = (DTYPE)t1;                                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        if (xsize & 1) da[2*csize] = tab[sa[0]];                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
      }                                                         \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    }                                                           \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
  }                                                             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
#define READ_U8_D64(table0, table1, table2, table3)             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8));    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
  t1 = *(mlib_d64*)((mlib_u8*)table1 + ((s0 >> 5) & 0x7F8));    \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 13)  & 0x7F8));  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 >> 21)  & 0x7F8))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
#define READ_U8_D64(table0, table1, table2, table3)             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 >> 21) & 0x7F8));   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  t1 = *(mlib_d64*)((mlib_u8*)table1 + ((s0 >> 13) & 0x7F8));   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5)  & 0x7F8));   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
  t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3)  & 0x7F8))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
void mlib_ImageLookUp_U8_D64(const mlib_u8  *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                             mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                             mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                             mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                             mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                             mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                             mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                             const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  if (xsize * csize < 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    MLIB_C_IMAGELOOKUP(mlib_d64, mlib_u8, table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  else if (csize == 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
      mlib_d64 *tab = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
      mlib_s32 size = xsize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
      for (i = 0; i < off; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        *dp++ = tab[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
      for (i = 0; i < size - 7; i += 4, dp += 4, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        READ_U8_D64(tab, tab, tab, tab);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
      READ_U8_D64(tab, tab, tab, tab);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
      dp += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
      for (; i < size; i++, dp++, sp++)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        dp[0] = tab[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  else if (csize == 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
      mlib_d64 *tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
      mlib_s32 size = xsize * 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
      for (i = 0; i < off - 1; i += 2, sp += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        size -= 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
      if ((off & 1) != 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        *dp++ = tab0[*sp];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
        tab = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        tab0 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
        tab1 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
      for (i = 0; i < size - 7; i += 4, dp += 4, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
        READ_U8_D64(tab0, tab1, tab0, tab1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
      READ_U8_D64(tab0, tab1, tab0, tab1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
      dp += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
      for (; i < size - 1; i += 2, sp += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
      if (i < size)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
        *dp = tab0[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
  else if (csize == 3) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
      mlib_d64 *tab2 = (mlib_d64 *) table[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
      mlib_d64 *tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
      mlib_s32 size = xsize * 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
      if (off == 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
        *dp++ = tab0[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
        tab = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        tab0 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
        tab1 = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
        tab2 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
      else if (off == 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
        tab = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
        tab2 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
        tab1 = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        tab0 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
        size -= 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        sp += 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
      else if (off == 3) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
        *dp++ = tab2[sp[2]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        size -= 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
        sp += 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
      for (i = 0; i < size - 7; i += 4, dp += 4, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
        READ_U8_D64(tab0, tab1, tab2, tab0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
        tab = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
        tab0 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
        tab1 = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
        tab2 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
      READ_U8_D64(tab0, tab1, tab2, tab0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
      dp += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        *dp++ = tab1[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
        *dp++ = tab2[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
        i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        *dp = tab0[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
  else if (csize == 4) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
      mlib_d64 *tab2 = (mlib_d64 *) table[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
      mlib_d64 *tab3 = (mlib_d64 *) table[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
      mlib_d64 *tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
      mlib_s32 size = xsize * 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
      if (off == 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        *dp++ = tab0[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
        tab = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        tab0 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
        tab1 = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
        tab2 = tab3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
        tab3 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
      else if (off == 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
        tab = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
        tab0 = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
        tab2 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
        tab = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
        tab1 = tab3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
        tab3 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
        size -= 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
        sp += 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
      else if (off == 3) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
        *dp++ = tab1[sp[1]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
        *dp++ = tab2[sp[2]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
        tab = tab3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
        tab3 = tab2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
        tab2 = tab1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
        tab1 = tab0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
        tab0 = tab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
        size -= 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
        sp += 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
      for (i = 0; i < size - 7; i += 4, dp += 4, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
        READ_U8_D64(tab0, tab1, tab2, tab3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
      READ_U8_D64(tab0, tab1, tab2, tab3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
      dp += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
        *dp++ = tab0[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
        i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
        *dp++ = tab1[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
        i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
        sp++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
      if (i < size) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
        *dp = tab2[(*sp)];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
void mlib_ImageLookUp_S16_D64(const mlib_s16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
                              const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
  const mlib_d64 *table_base[4];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
  for (c = 0; c < csize; c++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
    table_base[c] = &table[c][32768];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
  MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s16, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
void mlib_ImageLookUp_U16_D64(const mlib_u16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
                              const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
  const mlib_d64 *table_base[4];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
  for (c = 0; c < csize; c++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
    table_base[c] = &table[c][0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
  MLIB_C_IMAGELOOKUP(mlib_d64, mlib_u16, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
void mlib_ImageLookUp_S32_D64(const mlib_s32 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
                              const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
  const mlib_d64 *table_base[4];
6814
c6e347fb5b20 6725821: Compiler warnings in medialib code
bae
parents: 5506
diff changeset
   561
  mlib_u32 shift = TABLE_SHIFT_S32;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
  for (c = 0; c < csize; c++) {
6814
c6e347fb5b20 6725821: Compiler warnings in medialib code
bae
parents: 5506
diff changeset
   565
    table_base[c] = &table[c][shift];
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
  MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s32, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
void mlib_ImageLookUpSI_U8_D64(const mlib_u8  *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
                               mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
                               mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
                               mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
                               mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
                               mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
                               mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
                               const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
  if (xsize < 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
    MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_u8, table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
  else if (csize == 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
      mlib_s32 size = xsize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
      for (i = 0; i < off; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
      for (i = 0; i < size - 7; i += 4, dp += 8, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
        dp[4] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
        dp[5] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
        dp[6] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
        dp[7] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
      dp[4] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
      dp[5] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
      dp[6] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
      dp[7] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
      dp += 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
      for (; i < size; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
  else if (csize == 3) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
      mlib_d64 *tab2 = (mlib_d64 *) table[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
      mlib_d64 t0, t1, t2, t3, t4, t5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
      mlib_s32 size = xsize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
      for (i = 0; i < off; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
        *dp++ = tab2[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
      for (i = 0; i < size - 7; i += 4, dp += 12, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
        t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
        t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
        t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
        t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
        dp[4] = t4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
        dp[5] = t5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
        t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
        t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
        t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
        t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
        dp[6] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
        dp[7] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
        dp[8] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
        dp[9] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
        dp[10] = t4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
        dp[11] = t5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
      t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
      t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
      t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
      t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
      dp[4] = t4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
      dp[5] = t5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
      t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
      t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
      t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
      t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
      dp[6] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
      dp[7] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
      dp[8] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
      dp[9] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
      dp[10] = t4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
      dp[11] = t5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
      dp += 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
      for (; i < size; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
        *dp++ = tab2[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
  else if (csize == 4) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
    mlib_s32 i, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
    for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
      mlib_u32 *sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
      mlib_d64 *tab0 = (mlib_d64 *) table[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
      mlib_d64 *tab1 = (mlib_d64 *) table[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
      mlib_d64 *tab2 = (mlib_d64 *) table[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
      mlib_d64 *tab3 = (mlib_d64 *) table[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
      mlib_u32 s0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
      mlib_d64 t0, t1, t2, t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
      mlib_s32 off;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
      mlib_s32 size = xsize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
      mlib_d64 *dp = (mlib_d64 *) dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
      mlib_u8 *sp = (void *)src;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
      off = (mlib_s32) ((4 - ((mlib_addr) src & 3)) & 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
      for (i = 0; i < off; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
        *dp++ = tab2[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
        *dp++ = tab3[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
        size--;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
      sa = (mlib_u32 *) sp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
      s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
      sa++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
#ifdef __SUNPRO_C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
#endif /* __SUNPRO_C */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
      for (i = 0; i < size - 7; i += 4, dp += 16, sa++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
        dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
        dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
        dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
        dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
        dp[4] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
        dp[5] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
        dp[6] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
        dp[7] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
        dp[8] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
        dp[9] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
        dp[10] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
        dp[11] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
        t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
        t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
        t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
        t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
        s0 = sa[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
        dp[12] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
        dp[13] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
        dp[14] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
        dp[15] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
      dp[0] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
      dp[1] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
      dp[2] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
      dp[3] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
      dp[4] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
      dp[5] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
      dp[6] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
      dp[7] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
      dp[8] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
      dp[9] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
      dp[10] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
      dp[11] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
#ifdef _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
      t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
      t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
      t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
      t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
#endif /* _LITTLE_ENDIAN */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
      dp[12] = t0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
      dp[13] = t1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
      dp[14] = t2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
      dp[15] = t3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
      dp += 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
      sp = (mlib_u8 *) sa;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
      i += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
      for (; i < size; i++, sp++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
        *dp++ = tab0[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
        *dp++ = tab1[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
        *dp++ = tab2[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
        *dp++ = tab3[sp[0]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
void mlib_ImageLookUpSI_S16_D64(const mlib_s16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
                                const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
  const mlib_d64 *table_base[4];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
  for (c = 0; c < csize; c++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
    table_base[c] = &table[c][32768];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
  MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_s16, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
void mlib_ImageLookUpSI_U16_D64(const mlib_u16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
                                const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
  const mlib_d64 *table_base[4];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
  for (c = 0; c < csize; c++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
    table_base[c] = &table[c][0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
  MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_u16, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
void mlib_ImageLookUpSI_S32_D64(const mlib_s32 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
                                const mlib_d64 **table)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
  const mlib_d64 *table_base[4];
6814
c6e347fb5b20 6725821: Compiler warnings in medialib code
bae
parents: 5506
diff changeset
  1043
  mlib_u32 shift = TABLE_SHIFT_S32;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
  mlib_s32 c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
  for (c = 0; c < csize; c++) {
6814
c6e347fb5b20 6725821: Compiler warnings in medialib code
bae
parents: 5506
diff changeset
  1047
    table_base[c] = &table[c][shift];
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
  MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_s32, table_base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
/***************************************************************/