1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
diff -ru goom2k4-0/src/filters.c xine-lib/src/post/goom/filters.c
--- goom2k4-0/src/filters.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/filters.c 2005-07-18 12:15:50.000000000 -0300
@@ -704,7 +704,7 @@
data->general_speed = 0.0f;
data->reverse = 0;
- data->theMode = AMULETTE_MODE;
+ data->theMode = rand() % 10;
data->waveEffect = 0;
data->hypercosEffect = 0;
data->vPlaneEffect = 0;
diff -ru goom2k4-0/src/goom_core.c xine-lib/src/post/goom/goom_core.c
--- goom2k4-0/src/goom_core.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/goom_core.c 2005-07-19 12:39:22.000000000 -0300
@@ -26,6 +26,8 @@
#include "goom_fx.h"
#include "goomsl.h"
+#include "xine_internal.h"
+
/* #define VERBOSE */
#define STOP_SPEED 128
@@ -736,7 +738,12 @@
/* affichage et swappage des buffers.. */
goomInfo->cycle++;
+ /* xine: no convolve_fx */
+ /*
goomInfo->convolve_fx.apply(&goomInfo->convolve_fx,return_val,goomInfo->outputBuf,goomInfo);
+ */
+ xine_fast_memcpy(goomInfo->outputBuf, return_val, goomInfo->screen.size * sizeof(Pixel));
+
return (guint32*)goomInfo->outputBuf;
}
diff -ru goom2k4-0/src/goom_tools.c xine-lib/src/post/goom/goom_tools.c
--- goom2k4-0/src/goom_tools.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/goom_tools.c 2005-07-18 14:30:02.000000000 -0300
@@ -3,7 +3,6 @@
GoomRandom *goom_random_init(int i) {
GoomRandom *grandom = (GoomRandom*)malloc(sizeof(GoomRandom));
- srand (i);
grandom->pos = 1;
goom_random_update_array(grandom, GOOM_NB_RAND);
return grandom;
diff -ru goom2k4-0/src/ifs.c xine-lib/src/post/goom/ifs.c
--- goom2k4-0/src/ifs.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/ifs.c 2005-07-19 14:20:20.000000000 -0300
@@ -503,6 +503,13 @@
for (i = 0; i < 4; i++) {
*tmp = (*tmp) >> cycle10;
+
+ /* xine: make it darker */
+ if( *tmp && !((*tmp) >> 1) )
+ *tmp = 1;
+ else
+ *tmp = (*tmp) >> 1;
+
tmp++;
}
}
diff -ru goom2k4-0/src/tentacle3d.c xine-lib/src/post/goom/tentacle3d.c
--- goom2k4-0/src/tentacle3d.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/tentacle3d.c 2005-07-19 14:04:57.000000000 -0300
@@ -10,7 +10,7 @@
#define D 256.0f
#define nbgrid 6
-#define definitionx 15
+#define definitionx 9
#define definitionz 45
typedef struct _TENTACLE_FX_DATA {
diff -ru goom2k4-0/src/xmmx.c xine-lib/src/post/goom/xmmx.c
--- goom2k4-0/src/xmmx.c 2005-02-07 11:46:41.000000000 -0200
+++ xine-lib/src/post/goom/xmmx.c 2005-07-18 15:26:23.000000000 -0300
@@ -239,7 +239,11 @@
++loop;
}
- __asm__ __volatile__ ("femms\n");
+/*#ifdef HAVE_ATHLON*/
+ __asm__ __volatile__ ("emms\n");
+/*#else
+ emms();
+#endif*/
}
#define DRAWMETHOD_PLUS_XMMX(_out,_backbuf,_col) \
@@ -387,7 +391,7 @@
}
}
end_of_line:
- __asm__ __volatile__ ("femms\n");
+ __asm__ __volatile__ ("emms\n");
}
#endif
Index: xmmx.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/post/goom/xmmx.c,v
retrieving revision 1.6
diff -u -r1.6 xmmx.c
--- xmmx.c 19 Jul 2005 18:10:31 -0000 1.6
+++ xmmx.c 21 Jul 2005 20:48:09 -0000
@@ -50,10 +50,10 @@
ratiox.d[1] = buffratio;
asm volatile
- ("\n\t movq %[ratio], %%mm6"
+ ("\n\t movq %0, %%mm6"
"\n\t pslld $16, %%mm6" /* mm6 = [rat16=buffratio<<16 | rat16=buffratio<<16] */
"\n\t pxor %%mm7, %%mm7" /* mm7 = 0 */
- ::[ratio]"m"(ratiox));
+ ::"m"(ratiox));
loop=0;
@@ -69,8 +69,8 @@
*/
asm volatile
- ("#1 \n\t movq %[brutS], %%mm0"
- "#1 \n\t movq %[brutD], %%mm1"
+ ("#1 \n\t movq %0, %%mm0"
+ "#1 \n\t movq %1, %%mm1"
"#1 \n\t psubd %%mm0, %%mm1" /* mm1 = D - S */
"#1 \n\t movq %%mm1, %%mm2" /* mm2 = D - S */
"#1 \n\t pslld $16, %%mm1"
@@ -83,8 +83,8 @@
"#1 \n\t paddd %%mm1, %%mm0" /* mm0 = S + mm1 */
"#1 \n\t psrld $16, %%mm0"
:
- : [brutS]"g"(brutS[loop])
- , [brutD]"g"(brutD[loop])
+ : "g"(brutS[loop])
+ , "g"(brutD[loop])
); /* mm0 = S */
/*
@@ -94,7 +94,7 @@
* modified : mm0,mm1,mm2
*/
asm volatile
- ("#1 \n\t movq %[prevXY], %%mm1"
+ ("#1 \n\t movq %0, %%mm1"
"#1 \n\t pcmpgtd %%mm0, %%mm1"
/* mm0 en X contient (idem pour Y) :
* 1111 si prevXY > px
@@ -107,7 +107,7 @@
#endif
"#1 \n\t pand %%mm1, %%mm0" /* on met a zero la partie qui deborde */
- ::[prevXY]"m"(prevXY));
+ ::"m"(prevXY));
/* Thread #2
* pre : mm0 : clipped position on screen
@@ -127,11 +127,11 @@
"#2 \n\t shll $6,%%esi"
"#2 \n\t movd %%mm1,%%eax"
- "#2 \n\t addl %[precalCoef],%%esi"
+ "#2 \n\t addl %0,%%esi"
"#2 \n\t andl $15,%%eax"
"#2 \n\t movd (%%esi,%%eax,4),%%mm3"
- ::[precalCoef]"g"(precalCoef):"eax","esi");
+ ::"g"(precalCoef):"eax","esi");
/*
* extraction des coefficients... (Thread #3)
@@ -160,7 +160,7 @@
"#4 \n\t movd %%mm1,%%eax"
"#3 \n\t movq %%mm3,%%mm5"
- "#4 \n\t mull %[prevX]"
+ "#4 \n\t mull %1"
"#4 \n\t movd %%mm0,%%esi"
"#3 \n\t punpcklbw %%mm5, %%mm3"
@@ -169,18 +169,18 @@
"#3 \n\t movq %%mm3, %%mm4"
"#3 \n\t movq %%mm3, %%mm5"
- "#4 \n\t movl %[expix1], %%esi"
+ "#4 \n\t movl %0, %%esi"
"#3 \n\t punpcklbw %%mm5, %%mm3"
"#4 \n\t movq (%%esi,%%eax,4),%%mm0"
"#3 \n\t punpckhbw %%mm5, %%mm4"
- "#4 \n\t addl %[prevX],%%eax"
+ "#4 \n\t addl %1,%%eax"
"#4 \n\t movq (%%esi,%%eax,4),%%mm2"
:
- : [expix1] "g"(expix1)
- , [prevX] "g"(prevX)
+ : "g"(expix1)
+ , "g"(prevX)
:"eax","esi"
);
|