src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp.h
author adinn
Fri, 26 Jan 2018 16:38:21 +0000
changeset 48682 34e45260c040
parent 47216 71c04702a3d5
permissions -rw-r--r--
8196221: AArch64: Mistake in committed patch for JDK-8195859 Summary: The wrong patch was committed for JDK-8195859 Reviewed-by: aph
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2003, 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
#ifndef __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#define __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#include "mlib_ImageCopy.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
extern "C" {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#endif /* __cplusplus */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#ifdef _MSC_VER
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
/* Microsoft VC 6.0 compiler assumes that pointer fit into long
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
   and therefore array's index may not exceed MAX_INT/sizeof(data_type).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
   TABLE_SHIFT_32 is used as index in arrays of types up to mlib_d64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
   (see mlib_ImageLookUp_S32_D64 for instance) and therefore must not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
   exceed ((2^33/sizeof(mlib_d64)) - 1) */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#define TABLE_SHIFT_S32         (mlib_u32) 536870911
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#define TABLE_SHIFT_S32         536870911u
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#endif /* _MSC_VER */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
/* mlib_ImageLookUp_64.c */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
void mlib_ImageLookUp_U8_D64(const mlib_u8  *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
                             mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
                             mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
                             mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
                             mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
                             mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
                             mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
                             const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
void mlib_ImageLookUp_S16_D64(const mlib_s16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
                              const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
void mlib_ImageLookUp_U16_D64(const mlib_u16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                              const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
void mlib_ImageLookUp_S32_D64(const mlib_s32 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                              mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                              mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                              mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                              mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
                              mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                              mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                              const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
void mlib_ImageLookUpSI_U8_D64(const mlib_u8  *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                               mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                               mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                               mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                               mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                               mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                               mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                               const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
void mlib_ImageLookUpSI_S16_D64(const mlib_s16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                                const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
void mlib_ImageLookUpSI_U16_D64(const mlib_u16 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                                const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
void mlib_ImageLookUpSI_S32_D64(const mlib_s32 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                                mlib_s32       slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
                                mlib_d64       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                                mlib_s32       dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
                                mlib_s32       xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                                mlib_s32       ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                                mlib_s32       csize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                                const mlib_d64 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
/* mlib_ImageLookUp_Bit.c */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                                      mlib_s32      slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                                      mlib_u8       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                                      mlib_s32      dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                                      mlib_s32      xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                                      mlib_s32      ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                                      mlib_s32      nchan,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                                      mlib_s32      bitoff,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                                      const mlib_u8 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                                      mlib_s32      slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                                      mlib_u8       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                                      mlib_s32      dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                                      mlib_s32      xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                                      mlib_s32      ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                                      mlib_s32      nchan,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                                      mlib_s32      bitoff,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                                      const mlib_u8 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
mlib_status mlib_ImageLookUp_Bit_U8_3(const mlib_u8 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                                      mlib_s32      slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                                      mlib_u8       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                                      mlib_s32      dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
                                      mlib_s32      xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                                      mlib_s32      ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                                      mlib_s32      nchan,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
                                      mlib_s32      bitoff,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
                                      const mlib_u8 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
mlib_status mlib_ImageLookUp_Bit_U8_4(const mlib_u8 *src,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                                      mlib_s32      slb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                                      mlib_u8       *dst,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                                      mlib_s32      dlb,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                                      mlib_s32      xsize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
                                      mlib_s32      ysize,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
                                      mlib_s32      nchan,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                                      mlib_s32      bitoff,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                                      const mlib_u8 **table);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
#endif /* __cplusplus */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
#endif /* __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H */