--- a/jdk/make/sun/image/generic/Makefile Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/make/sun/image/generic/Makefile Fri Oct 15 10:42:39 2010 +0400
@@ -69,5 +69,8 @@
-I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib
OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES
-OTHER_LDLIBS = $(LIBM) -ldl
+ifneq ($(PLATFORM), windows)
+ OTHER_LDLIBS = $(LIBM) -ldl
+endif
+
--- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Fri Oct 15 10:42:39 2010 +0400
@@ -558,10 +558,11 @@
const mlib_d64 **table)
{
const mlib_d64 *table_base[4];
+ mlib_u32 shift = TABLE_SHIFT_S32;
mlib_s32 c;
for (c = 0; c < csize; c++) {
- table_base[c] = &table[c][TABLE_SHIFT_S32];
+ table_base[c] = &table[c][shift];
}
MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s32, table_base);
@@ -1039,10 +1040,11 @@
const mlib_d64 **table)
{
const mlib_d64 *table_base[4];
+ mlib_u32 shift = TABLE_SHIFT_S32;
mlib_s32 c;
for (c = 0; c < csize; c++) {
- table_base[c] = &table[c][TABLE_SHIFT_S32];
+ table_base[c] = &table[c][shift];
}
MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_s32, table_base);
--- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c Fri Oct 15 10:42:39 2010 +0400
@@ -169,7 +169,8 @@
{
mlib_s32 *sl;
mlib_s16 *dl;
- const mlib_s16 *tab = &table[0][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab = &table[0][shift];
mlib_s32 j, i;
sl = (void *)src;
@@ -209,6 +210,7 @@
{
mlib_s32 *sl;
mlib_s16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_s16 *tab;
mlib_s32 j, i;
@@ -220,8 +222,8 @@
mlib_s32 *sp = sl;
mlib_s16 *dp = dl;
mlib_s32 off, size = xsize * 2;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
@@ -261,6 +263,7 @@
{
mlib_s32 *sl;
mlib_s16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_s16 *tab;
mlib_s32 j;
@@ -271,10 +274,10 @@
for (j = 0; j < ysize; j++) {
mlib_s32 *sp = sl;
mlib_s16 *dp = dl;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
+ const mlib_s16 *tab3 = &table[3][shift];
mlib_s32 off, size = xsize * 4;
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
@@ -453,6 +456,7 @@
{
mlib_s32 *sl;
mlib_s16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_s16 *tab;
mlib_s32 j, i;
@@ -463,9 +467,9 @@
for (j = 0; j < ysize; j++) {
mlib_s32 *sp = sl;
mlib_s16 *dp = dl;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
mlib_s32 off, size = xsize * 3;
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
--- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c Fri Oct 15 10:42:39 2010 +0400
@@ -170,7 +170,8 @@
{
mlib_s32 *sl;
mlib_u16 *dl;
- const mlib_u16 *tab = &table[0][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab = &table[0][shift];
mlib_s32 j, i;
sl = (void *)src;
@@ -211,6 +212,7 @@
{
mlib_s32 *sl;
mlib_u16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_u16 *tab;
mlib_s32 j, i;
@@ -222,8 +224,8 @@
mlib_s32 *sp = sl;
mlib_u16 *dp = dl;
mlib_s32 off, size = xsize * 2;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
@@ -264,6 +266,7 @@
{
mlib_s32 *sl;
mlib_u16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_u16 *tab;
mlib_s32 j;
@@ -274,10 +277,10 @@
for (j = 0; j < ysize; j++) {
mlib_s32 *sp = sl;
mlib_u16 *dp = dl;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
+ const mlib_u16 *tab3 = &table[3][shift];
mlib_s32 off, size = xsize * 4;
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
@@ -457,6 +460,7 @@
{
mlib_s32 *sl;
mlib_u16 *dl;
+ mlib_u32 shift = 2147483648u;
const mlib_u16 *tab;
mlib_s32 j, i;
@@ -467,9 +471,9 @@
for (j = 0; j < ysize; j++) {
mlib_s32 *sp = sl;
mlib_u16 *dp = dl;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
mlib_s32 off, size = xsize * 3;
off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1);
--- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c Fri Oct 15 10:42:39 2010 +0400
@@ -81,8 +81,9 @@
mlib_d64 t0, t1, t2; /* destination data */
mlib_d64 t3, acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
sp = (void *)src;
dl = dst;
@@ -145,8 +146,9 @@
mlib_d64 t0, t1, t2; /* destination data */
mlib_d64 t3, acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
sp = (void *)src;
dl = dst;
@@ -220,8 +222,9 @@
mlib_s32 *sl;
mlib_s16 *dl;
mlib_s32 j;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
sl = (void *)src;
dl = dst;
@@ -268,9 +271,10 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc0, acc1, acc2; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
mlib_s32 s00, s01, s02, s03;
sp = (void *)src;
@@ -379,9 +383,10 @@
mlib_s32 *sl;
mlib_s16 *dl;
mlib_s32 i, j;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
sl = (void *)src;
dl = dst;
@@ -425,10 +430,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
+ const mlib_s16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -479,10 +485,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
+ const mlib_s16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -543,10 +550,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
+ const mlib_s16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -606,10 +614,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
+ const mlib_s16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -667,9 +676,10 @@
mlib_s32 *sl;
mlib_s16 *dl;
mlib_s32 j;
- const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_s16 *tab0 = &table[0][shift];
+ const mlib_s16 *tab1 = &table[1][shift];
+ const mlib_s16 *tab2 = &table[2][shift];
sl = (void *)src;
dl = dst;
--- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c Thu Oct 07 12:25:23 2010 +0400
+++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c Fri Oct 15 10:42:39 2010 +0400
@@ -81,8 +81,9 @@
mlib_d64 t0, t1, t2; /* destination data */
mlib_d64 t3, acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
sp = (void *)src;
dl = dst;
@@ -145,8 +146,9 @@
mlib_d64 t0, t1, t2; /* destination data */
mlib_d64 t3, acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
sp = (void *)src;
dl = dst;
@@ -220,8 +222,9 @@
mlib_s32 *sl;
mlib_u16 *dl;
mlib_s32 j;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
sl = (void *)src;
dl = dst;
@@ -268,9 +271,10 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc0, acc1, acc2; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
mlib_s32 s00, s01, s02, s03;
sp = (void *)src;
@@ -379,9 +383,10 @@
mlib_s32 *sl;
mlib_u16 *dl;
mlib_s32 i, j;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
sl = (void *)src;
dl = dst;
@@ -425,10 +430,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
+ const mlib_u16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -479,10 +485,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
+ const mlib_u16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -543,10 +550,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
+ const mlib_u16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -606,10 +614,11 @@
mlib_d64 t0, t1, t2, t3; /* destination data */
mlib_d64 acc; /* destination data */
mlib_s32 i; /* loop variable */
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
- const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
+ const mlib_u16 *tab3 = &table[3][shift];
sp = (void *)src;
dl = dst;
@@ -667,9 +676,10 @@
mlib_s32 *sl;
mlib_u16 *dl;
mlib_s32 j;
- const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u];
- const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u];
- const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u];
+ mlib_u32 shift = 2147483648u;
+ const mlib_u16 *tab0 = &table[0][shift];
+ const mlib_u16 *tab1 = &table[1][shift];
+ const mlib_u16 *tab2 = &table[2][shift];
sl = (void *)src;
dl = dst;