< prev index next >

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

Print this page
rev 59383 : [mq]: final
   1 /*
   2  * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1641   -0.2888500690f,    9.0388500690f,  255.4120776653f,   -8.1620776653f,
1642   -0.2573010921f,    8.5073010921f,  255.4768297672f,   -7.7268297672f,
1643   -0.2275164127f,    7.9775164127f,  255.5378644466f,   -7.2878644466f,
1644   -0.1995074749f,    7.4495074749f,  255.5951702595f,   -6.8451702595f,
1645   -0.1732857227f,    6.9232857227f,  255.6487357616f,   -6.3987357616f,
1646   -0.1488626003f,    6.3988626003f,  255.6985495090f,   -5.9485495090f,
1647   -0.1262495518f,    5.8762495518f,  255.7446000576f,   -5.4946000576f,
1648   -0.1054580212f,    5.3554580212f,  255.7868759632f,   -5.0368759632f,
1649   -0.0864994526f,    4.8364994526f,  255.8253657818f,   -4.5753657818f,
1650   -0.0693852901f,    4.3193852901f,  255.8600580692f,   -4.1100580692f,
1651   -0.0541269779f,    3.8041269779f,  255.8909413815f,   -3.6409413815f,
1652   -0.0407359600f,    3.2907359600f,  255.9180042744f,   -3.1680042744f,
1653   -0.0292236805f,    2.7792236805f,  255.9412353039f,   -2.6912353039f,
1654   -0.0196015835f,    2.2696015835f,  255.9606230259f,   -2.2106230259f,
1655   -0.0118811131f,    1.7618811131f,  255.9761559963f,   -1.7261559963f,
1656   -0.0060737133f,    1.2560737133f,  255.9878227711f,   -1.2378227711f,
1657   -0.0021908283f,    0.7521908283f,  255.9956119061f,   -0.7456119061f,
1658   -0.0002439022f,    0.2502439022f,  255.9995119572f,   -0.2495119572f
1659 };
1660 
1661 #ifndef __sparc         /* for x86, using integer multiplies is faster */
1662 
1663 /***************************************************************/
1664 const mlib_s16 mlib_filters_u8_bc[] = {
1665    -16,  16384,     16,      0,
1666    -47,  16383,     49,      0,
1667    -78,  16380,     83,     -1,
1668   -109,  16376,    118,     -2,
1669   -139,  16371,    154,     -2,
1670   -169,  16365,    191,     -4,
1671   -198,  16358,    229,     -5,
1672   -226,  16349,    268,     -7,
1673   -254,  16340,    307,     -9,
1674   -282,  16329,    348,    -11,
1675   -309,  16317,    389,    -13,
1676   -336,  16304,    432,    -16,
1677   -362,  16289,    475,    -19,
1678   -388,  16274,    520,    -22,
1679   -413,  16257,    565,    -25,
1680   -438,  16239,    611,    -28,
1681   -462,  16220,    658,    -32,


3196    -33,   1089,  32701,   -989,
3197    -29,   1021,  32709,   -933,
3198    -26,    954,  32716,   -876,
3199    -22,    886,  32723,   -819,
3200    -19,    819,  32729,   -761,
3201    -16,    752,  32735,   -703,
3202    -13,    685,  32741,   -645,
3203    -11,    619,  32746,   -586,
3204     -9,    553,  32750,   -526,
3205     -7,    487,  32754,   -466,
3206     -5,    421,  32758,   -406,
3207     -4,    356,  32760,   -344,
3208     -3,    291,  32763,   -283,
3209     -2,    226,  32765,   -221,
3210     -1,    161,  32766,   -158,
3211      0,     96,  32767,    -95,
3212      0,     32,  32767,    -32
3213 };
3214 
3215 /***************************************************************/
3216 
3217 #endif  /* #ifndef __sparc */
   1 /*
   2  * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1641   -0.2888500690f,    9.0388500690f,  255.4120776653f,   -8.1620776653f,
1642   -0.2573010921f,    8.5073010921f,  255.4768297672f,   -7.7268297672f,
1643   -0.2275164127f,    7.9775164127f,  255.5378644466f,   -7.2878644466f,
1644   -0.1995074749f,    7.4495074749f,  255.5951702595f,   -6.8451702595f,
1645   -0.1732857227f,    6.9232857227f,  255.6487357616f,   -6.3987357616f,
1646   -0.1488626003f,    6.3988626003f,  255.6985495090f,   -5.9485495090f,
1647   -0.1262495518f,    5.8762495518f,  255.7446000576f,   -5.4946000576f,
1648   -0.1054580212f,    5.3554580212f,  255.7868759632f,   -5.0368759632f,
1649   -0.0864994526f,    4.8364994526f,  255.8253657818f,   -4.5753657818f,
1650   -0.0693852901f,    4.3193852901f,  255.8600580692f,   -4.1100580692f,
1651   -0.0541269779f,    3.8041269779f,  255.8909413815f,   -3.6409413815f,
1652   -0.0407359600f,    3.2907359600f,  255.9180042744f,   -3.1680042744f,
1653   -0.0292236805f,    2.7792236805f,  255.9412353039f,   -2.6912353039f,
1654   -0.0196015835f,    2.2696015835f,  255.9606230259f,   -2.2106230259f,
1655   -0.0118811131f,    1.7618811131f,  255.9761559963f,   -1.7261559963f,
1656   -0.0060737133f,    1.2560737133f,  255.9878227711f,   -1.2378227711f,
1657   -0.0021908283f,    0.7521908283f,  255.9956119061f,   -0.7456119061f,
1658   -0.0002439022f,    0.2502439022f,  255.9995119572f,   -0.2495119572f
1659 };
1660 
1661 /* for x86, using integer multiplies is faster */
1662 
1663 /***************************************************************/
1664 const mlib_s16 mlib_filters_u8_bc[] = {
1665    -16,  16384,     16,      0,
1666    -47,  16383,     49,      0,
1667    -78,  16380,     83,     -1,
1668   -109,  16376,    118,     -2,
1669   -139,  16371,    154,     -2,
1670   -169,  16365,    191,     -4,
1671   -198,  16358,    229,     -5,
1672   -226,  16349,    268,     -7,
1673   -254,  16340,    307,     -9,
1674   -282,  16329,    348,    -11,
1675   -309,  16317,    389,    -13,
1676   -336,  16304,    432,    -16,
1677   -362,  16289,    475,    -19,
1678   -388,  16274,    520,    -22,
1679   -413,  16257,    565,    -25,
1680   -438,  16239,    611,    -28,
1681   -462,  16220,    658,    -32,


3196    -33,   1089,  32701,   -989,
3197    -29,   1021,  32709,   -933,
3198    -26,    954,  32716,   -876,
3199    -22,    886,  32723,   -819,
3200    -19,    819,  32729,   -761,
3201    -16,    752,  32735,   -703,
3202    -13,    685,  32741,   -645,
3203    -11,    619,  32746,   -586,
3204     -9,    553,  32750,   -526,
3205     -7,    487,  32754,   -466,
3206     -5,    421,  32758,   -406,
3207     -4,    356,  32760,   -344,
3208     -3,    291,  32763,   -283,
3209     -2,    226,  32765,   -221,
3210     -1,    161,  32766,   -158,
3211      0,     96,  32767,    -95,
3212      0,     32,  32767,    -32
3213 };
3214 
3215 /***************************************************************/


< prev index next >