Alien-FreeImage
view release on metacpan or search on metacpan
patches/FreeImage-3.17.0-ALL-IN-ONE.patch view on Meta::CPAN
#define CONVERT_COEFFS_TO_BIN(A, B, C, D) \
- "ulw %[temp0], "#A"(%[out]) \n\t" \
- "ulw %[temp1], "#B"(%[out]) \n\t" \
- "ulw %[temp2], "#C"(%[out]) \n\t" \
- "ulw %[temp3], "#D"(%[out]) \n\t" \
+ "ulw %[temp0], " #A "(%[out]) \n\t" \
+ "ulw %[temp1], " #B "(%[out]) \n\t" \
+ "ulw %[temp2], " #C "(%[out]) \n\t" \
+ "ulw %[temp3], " #D "(%[out]) \n\t" \
"absq_s.ph %[temp0], %[temp0] \n\t" \
"absq_s.ph %[temp1], %[temp1] \n\t" \
"absq_s.ph %[temp2], %[temp2] \n\t" \
diff -ru src.3170/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c src/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c
--- src.3170/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c 2015-02-20 02:34:34.000000000 +0100
+++ src/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c 2017-06-22 22:17:19.462540500 +0200
@@ -48,7 +48,7 @@
"srl %[temp0], %[length], 0x2 \n\t" \
"beqz %[temp0], 4f \n\t" \
" andi %[temp6], %[length], 0x3 \n\t" \
- ".if "#INVERSE" \n\t" \
+ ".if " #INVERSE " \n\t" \
"lbu %[temp1], -1(%[src]) \n\t" \
"1: \n\t" \
"lbu %[temp2], 0(%[src]) \n\t" \
@@ -84,7 +84,7 @@
"lbu %[temp1], -1(%[src]) \n\t" \
"lbu %[temp2], 0(%[src]) \n\t" \
"addiu %[src], %[src], 1 \n\t" \
- ".if "#INVERSE" \n\t" \
+ ".if " #INVERSE " \n\t" \
"addu %[temp3], %[temp1], %[temp2] \n\t" \
"sb %[temp3], -1(%[src]) \n\t" \
".else \n\t" \
@@ -131,7 +131,7 @@
"ulw %[temp3], 4(%[src]) \n\t" \
"ulw %[temp4], 4(%[pred]) \n\t" \
"addiu %[src], %[src], 8 \n\t" \
- ".if "#INVERSE" \n\t" \
+ ".if " #INVERSE " \n\t" \
"addu.qb %[temp5], %[temp1], %[temp2] \n\t" \
"addu.qb %[temp6], %[temp3], %[temp4] \n\t" \
".else \n\t" \
@@ -152,7 +152,7 @@
"lbu %[temp2], 0(%[pred]) \n\t" \
"addiu %[src], %[src], 1 \n\t" \
"addiu %[pred], %[pred], 1 \n\t" \
- ".if "#INVERSE" \n\t" \
+ ".if " #INVERSE " \n\t" \
"addu %[temp3], %[temp1], %[temp2] \n\t" \
".else \n\t" \
"subu %[temp3], %[temp1], %[temp2] \n\t" \
@@ -177,7 +177,7 @@
__asm__ volatile ( \
"lbu %[temp1], 0(%[src]) \n\t" \
"lbu %[temp2], 0(%[pred]) \n\t" \
- ".if "#INVERSE" \n\t" \
+ ".if " #INVERSE " \n\t" \
"addu %[temp3], %[temp1], %[temp2] \n\t" \
".else \n\t" \
"subu %[temp3], %[temp1], %[temp2] \n\t" \
diff -ru src.3170/Source/LibWebP/src/dsp/dsp.lossless_mips32.c src/Source/LibWebP/src/dsp/dsp.lossless_mips32.c
--- src.3170/Source/LibWebP/src/dsp/dsp.lossless_mips32.c 2015-02-20 02:34:36.000000000 +0100
+++ src/Source/LibWebP/src/dsp/dsp.lossless_mips32.c 2017-06-22 22:18:06.110473600 +0200
@@ -285,28 +285,28 @@
// literal_ and successive histograms could be unaligned
// so we must use ulw and usw
#define ADD_TO_OUT(A, B, C, D, E, P0, P1, P2) \
- "ulw %[temp0], "#A"(%["#P0"]) \n\t" \
- "ulw %[temp1], "#B"(%["#P0"]) \n\t" \
- "ulw %[temp2], "#C"(%["#P0"]) \n\t" \
- "ulw %[temp3], "#D"(%["#P0"]) \n\t" \
- "ulw %[temp4], "#A"(%["#P1"]) \n\t" \
- "ulw %[temp5], "#B"(%["#P1"]) \n\t" \
- "ulw %[temp6], "#C"(%["#P1"]) \n\t" \
- "ulw %[temp7], "#D"(%["#P1"]) \n\t" \
+ "ulw %[temp0], " #A "(%[" #P0 "]) \n\t" \
+ "ulw %[temp1], " #B "(%[" #P0 "]) \n\t" \
+ "ulw %[temp2], " #C "(%[" #P0 "]) \n\t" \
+ "ulw %[temp3], " #D "(%[" #P0 "]) \n\t" \
+ "ulw %[temp4], " #A "(%[" #P1 "]) \n\t" \
+ "ulw %[temp5], " #B "(%[" #P1 "]) \n\t" \
+ "ulw %[temp6], " #C "(%[" #P1 "]) \n\t" \
+ "ulw %[temp7], " #D "(%[" #P1 "]) \n\t" \
"addu %[temp4], %[temp4], %[temp0] \n\t" \
"addu %[temp5], %[temp5], %[temp1] \n\t" \
"addu %[temp6], %[temp6], %[temp2] \n\t" \
"addu %[temp7], %[temp7], %[temp3] \n\t" \
- "addiu %["#P0"], %["#P0"], 16 \n\t" \
- ".if "#E" == 1 \n\t" \
- "addiu %["#P1"], %["#P1"], 16 \n\t" \
+ "addiu %[" #P0 "], %[" #P0 "], 16 \n\t" \
+ ".if " #E " == 1 \n\t" \
+ "addiu %[" #P1 "], %[" #P1 "], 16 \n\t" \
".endif \n\t" \
- "usw %[temp4], "#A"(%["#P2"]) \n\t" \
- "usw %[temp5], "#B"(%["#P2"]) \n\t" \
- "usw %[temp6], "#C"(%["#P2"]) \n\t" \
- "usw %[temp7], "#D"(%["#P2"]) \n\t" \
- "addiu %["#P2"], %["#P2"], 16 \n\t" \
- "bne %["#P0"], %[LoopEnd], 1b \n\t" \
+ "usw %[temp4], " #A "(%[" #P2 "]) \n\t" \
+ "usw %[temp5], " #B "(%[" #P2 "]) \n\t" \
+ "usw %[temp6], " #C "(%[" #P2 "]) \n\t" \
+ "usw %[temp7], " #D "(%[" #P2 "]) \n\t" \
+ "addiu %[" #P2 "], %[" #P2 "], 16 \n\t" \
+ "bne %[" #P0 "], %[LoopEnd], 1b \n\t" \
".set pop \n\t" \
#define ASM_END_COMMON_0 \
diff -ru src.3170/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c src/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c
--- src.3170/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c 2015-03-08 20:53:02.000000000 +0100
+++ src/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c 2017-06-22 22:18:06.110473600 +0200
@@ -29,14 +29,14 @@
for (x = 0; x < (width >> 2); ++x) { \
int tmp1, tmp2, tmp3, tmp4; \
__asm__ volatile ( \
- ".ifc "#TYPE", uint8_t \n\t" \
+ ".ifc " #TYPE ", uint8_t \n\t" \
"lbu %[tmp1], 0(%[src]) \n\t" \
"lbu %[tmp2], 1(%[src]) \n\t" \
"lbu %[tmp3], 2(%[src]) \n\t" \
"lbu %[tmp4], 3(%[src]) \n\t" \
"addiu %[src], %[src], 4 \n\t" \
".endif \n\t" \
- ".ifc "#TYPE", uint32_t \n\t" \
+ ".ifc " #TYPE ", uint32_t \n\t" \
"lw %[tmp1], 0(%[src]) \n\t" \
"lw %[tmp2], 4(%[src]) \n\t" \
"lw %[tmp3], 8(%[src]) \n\t" \
@@ -55,7 +55,7 @@
"lwx %[tmp2], %[tmp2](%[color_map]) \n\t" \
"lwx %[tmp3], %[tmp3](%[color_map]) \n\t" \
"lwx %[tmp4], %[tmp4](%[color_map]) \n\t" \
- ".ifc "#TYPE", uint8_t \n\t" \
+ ".ifc " #TYPE ", uint8_t \n\t" \
"ext %[tmp1], %[tmp1], 8, 8 \n\t" \
"ext %[tmp2], %[tmp2], 8, 8 \n\t" \
"ext %[tmp3], %[tmp3], 8, 8 \n\t" \
@@ -66,7 +66,7 @@
"sb %[tmp4], 3(%[dst]) \n\t" \
"addiu %[dst], %[dst], 4 \n\t" \
".endif \n\t" \
- ".ifc "#TYPE", uint32_t \n\t" \
+ ".ifc " #TYPE ", uint32_t \n\t" \
"sw %[tmp1], 0(%[dst]) \n\t" \
"sw %[tmp2], 4(%[dst]) \n\t" \
"sw %[tmp3], 8(%[dst]) \n\t" \
diff -ru src.3170/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c src/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c
--- src.3170/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c 2015-02-20 02:34:36.000000000 +0100
+++ src/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c 2017-06-22 22:18:47.792849300 +0200
@@ -34,15 +34,15 @@
G = G - t2 + kGCst; \
B = B + kBCst; \
__asm__ volatile ( \
- "shll_s.w %["#R"], %["#R"], 9 \n\t" \
- "shll_s.w %["#G"], %["#G"], 9 \n\t" \
- "shll_s.w %["#B"], %["#B"], 9 \n\t" \
- "precrqu_s.qb.ph %["#R"], %["#R"], $zero \n\t" \
- "precrqu_s.qb.ph %["#G"], %["#G"], $zero \n\t" \
- "precrqu_s.qb.ph %["#B"], %["#B"], $zero \n\t" \
- "srl %["#R"], %["#R"], 24 \n\t" \
- "srl %["#G"], %["#G"], 24 \n\t" \
- "srl %["#B"], %["#B"], 24 \n\t" \
+ "shll_s.w %[" #R "], %[" #R "], 9 \n\t" \
+ "shll_s.w %[" #G "], %[" #G "], 9 \n\t" \
+ "shll_s.w %[" #B "], %[" #B "], 9 \n\t" \
+ "precrqu_s.qb.ph %[" #R "], %[" #R "], $zero \n\t" \
+ "precrqu_s.qb.ph %[" #G "], %[" #G "], $zero \n\t" \
+ "precrqu_s.qb.ph %[" #B "], %[" #B "], $zero \n\t" \
+ "srl %[" #R "], %[" #R "], 24 \n\t" \
+ "srl %[" #G "], %[" #G "], 24 \n\t" \
+ "srl %[" #B "], %[" #B "], 24 \n\t" \
( run in 0.709 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )