Mercurial > mplayer.hg
annotate libmpcodecs/vf_tfields.c @ 10052:b358b7509e1a
sort of a hack, but at least this lets the framerate-increasing
filters work in mplayer, albeit without proper timing...
author | rfelker |
---|---|
date | Sat, 03 May 2003 05:59:29 +0000 |
parents | 765c2276aa0c |
children | 379f48cace77 |
rev | line source |
---|---|
9514 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 | |
5 #include "../config.h" | |
6 #include "../mp_msg.h" | |
10020 | 7 #include "../cpudetect.h" |
9514 | 8 |
9 #include "img_format.h" | |
10 #include "mp_image.h" | |
11 #include "vf.h" | |
12 | |
13 #include "../libvo/fastmemcpy.h" | |
14 | |
15 struct vf_priv_s { | |
16 int mode; | |
17 }; | |
18 | |
19 static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride) | |
20 { | |
21 int i; | |
22 void *retval=dst; | |
23 | |
24 for(i=0; i<height; i++) | |
25 { | |
26 memcpy(dst, src, bytesPerLine); | |
27 src+= srcStride; | |
28 dst+= dstStride; | |
29 } | |
30 | |
31 return retval; | |
32 } | |
33 | |
34 static void deint(unsigned char *dest, int ds, unsigned char *src, int ss, int w, int h, int field) | |
35 { | |
36 int x, y; | |
37 src += ss; | |
38 dest += ds; | |
39 if (field) { | |
40 src += ss; | |
41 dest += ds; | |
42 h -= 2; | |
43 } | |
44 for (y=h/2; y; y--) { | |
45 for (x=0; x<w; x++) { | |
46 if (((src[x-ss] < src[x]) && (src[x+ss] < src[x])) || | |
47 ((src[x-ss] > src[x]) && (src[x+ss] > src[x]))) { | |
48 //dest[x] = (src[x+ss] + src[x-ss])>>1; | |
49 dest[x] = ((src[x+ss]<<1) + (src[x-ss]<<1) | |
50 + src[x+ss+1] + src[x-ss+1] | |
51 + src[x+ss-1] + src[x-ss-1])>>3; | |
52 } | |
53 else dest[x] = src[x]; | |
54 } | |
55 dest += ds<<1; | |
56 src += ss<<1; | |
57 } | |
58 } | |
59 | |
10020 | 60 #ifdef HAVE_3DNOW |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
61 static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
62 { |
10020 | 63 int i, j, ssd=ss; |
64 int crap1, crap2; | |
65 if (up) { | |
66 ssd = -ss; | |
67 memcpy(d, s, w); | |
68 d += ds; | |
69 s += ss; | |
70 } | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
71 for (i=h-1; i; i--) { |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
72 asm volatile( |
10020 | 73 "1: \n\t" |
74 "movq (%%esi), %%mm0 \n\t" | |
75 "movq (%%esi,%%eax), %%mm1 \n\t" | |
76 "pavgusb %%mm0, %%mm1 \n\t" | |
77 "addl $8, %%esi \n\t" | |
78 "pavgusb %%mm0, %%mm1 \n\t" | |
79 "movq %%mm1, (%%edi) \n\t" | |
80 "addl $8, %%edi \n\t" | |
81 "decl %%ecx \n\t" | |
82 "jnz 1b \n\t" | |
83 : "=S"(crap1), "=D"(crap2) | |
84 : "c"(w>>3), "S"(s), "D"(d), "a"(ssd) | |
85 ); | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
86 for (j=w-(w&7); j<w; j++) |
10020 | 87 d[j] = (s[j+ssd] + 3*s[j])>>2; |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
88 d += ds; |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
89 s += ss; |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
90 } |
10020 | 91 if (!up) memcpy(d, s, w); |
92 asm volatile("emms \n\t" : : : "memory"); | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
93 } |
10020 | 94 #endif |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
95 |
10020 | 96 #ifdef HAVE_MMX2 |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
97 static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
98 { |
10020 | 99 int i, j, ssd=ss; |
100 int crap1, crap2; | |
101 if (up) { | |
102 ssd = -ss; | |
103 memcpy(d, s, w); | |
104 d += ds; | |
105 s += ss; | |
106 } | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
107 for (i=h-1; i; i--) { |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
108 asm volatile( |
10020 | 109 "pxor %%mm7, %%mm7 \n\t" |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
110 "2: \n\t" |
10020 | 111 "movq (%%esi), %%mm0 \n\t" |
112 "movq (%%esi,%%eax), %%mm1 \n\t" | |
113 "pavgb %%mm0, %%mm1 \n\t" | |
114 "addl $8, %%esi \n\t" | |
115 "pavgb %%mm0, %%mm1 \n\t" | |
116 "movq %%mm1, (%%edi) \n\t" | |
117 "addl $8, %%edi \n\t" | |
118 "decl %%ecx \n\t" | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
119 "jnz 2b \n\t" |
10020 | 120 : "=S"(crap1), "=D"(crap2) |
121 : "c"(w>>3), "S"(s), "D"(d), "a"(ssd) | |
122 ); | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
123 for (j=w-(w&7); j<w; j++) |
10020 | 124 d[j] = (s[j+ssd] + 3*s[j])>>2; |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
125 d += ds; |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
126 s += ss; |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
127 } |
10020 | 128 if (!up) memcpy(d, s, w); |
129 asm volatile("emms \n\t" : : : "memory"); | |
130 } | |
131 #endif | |
132 | |
133 #ifdef HAVE_MMX | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
134 static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
10020 | 135 { |
136 int i, j, ssd=ss; | |
137 int crap1, crap2; | |
138 if (up) { | |
139 ssd = -ss; | |
140 memcpy(d, s, w); | |
141 d += ds; | |
142 s += ss; | |
143 } | |
144 for (i=h-1; i; i--) { | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
145 asm volatile( |
10020 | 146 "pxor %%mm7, %%mm7 \n\t" |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
147 "3: \n\t" |
10020 | 148 "movq (%%esi), %%mm0 \n\t" |
149 "movq (%%esi), %%mm1 \n\t" | |
150 "movq (%%esi,%%eax), %%mm2 \n\t" | |
151 "movq (%%esi,%%eax), %%mm3 \n\t" | |
152 "addl $8, %%esi \n\t" | |
153 "punpcklbw %%mm7, %%mm0 \n\t" | |
154 "punpckhbw %%mm7, %%mm1 \n\t" | |
155 "punpcklbw %%mm7, %%mm2 \n\t" | |
156 "punpckhbw %%mm7, %%mm3 \n\t" | |
157 "paddw %%mm0, %%mm2 \n\t" | |
158 "paddw %%mm1, %%mm3 \n\t" | |
159 "paddw %%mm0, %%mm2 \n\t" | |
160 "paddw %%mm1, %%mm3 \n\t" | |
161 "paddw %%mm0, %%mm2 \n\t" | |
162 "paddw %%mm1, %%mm3 \n\t" | |
163 "psrlw $2, %%mm2 \n\t" | |
164 "psrlw $2, %%mm3 \n\t" | |
165 "packsswb %%mm3, %%mm2 \n\t" | |
166 "movq %%mm2, (%%edi) \n\t" | |
167 "addl $8, %%edi \n\t" | |
168 "decl %%ecx \n\t" | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
169 "jnz 3b \n\t" |
10020 | 170 : "=S"(crap1), "=D"(crap2) |
171 : "c"(w>>3), "S"(s), "D"(d), "a"(ssd) | |
172 ); | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
173 for (j=w-(w&7); j<w; j++) |
10020 | 174 d[j] = (s[j+ssd] + 3*s[j])>>2; |
175 d += ds; | |
176 s += ss; | |
177 } | |
178 if (!up) memcpy(d, s, w); | |
179 asm volatile("emms \n\t" : : : "memory"); | |
180 } | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
181 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
182 static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
183 { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
184 int i, j, ssd=ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
185 static const short filter[] = { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
186 29, 29, 29, 29, 110, 110, 110, 110, |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
187 9, 9, 9, 9, 3, 3, 3, 3, |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
188 64, 64, 64, 64 }; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
189 int crap1, crap2; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
190 if (up) { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
191 ssd = -ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
192 memcpy(d, s, w); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
193 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
194 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
195 for (j=0; j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
196 d[j] = (s[j+ssd] + 3*s[j])>>2; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
197 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
198 for (i=h-3; i; i--) { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
199 asm volatile( |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
200 "pxor %%mm0, %%mm0 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
201 "movq (%%edx), %%mm4 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
202 "movq 8(%%edx), %%mm5 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
203 "movq 16(%%edx), %%mm6 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
204 "movq 24(%%edx), %%mm7 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
205 "4: \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
206 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
207 "movq (%%esi,%%eax), %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
208 "movq (%%esi), %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
209 "movq (%%esi,%%ebx), %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
210 "punpcklbw %%mm0, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
211 "punpcklbw %%mm0, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
212 "pmullw %%mm4, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
213 "punpcklbw %%mm0, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
214 "pmullw %%mm5, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
215 "paddusw %%mm2, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
216 "pmullw %%mm6, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
217 "movq (%%esi,%%eax,2), %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
218 "psubusw %%mm3, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
219 "punpcklbw %%mm0, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
220 "pmullw %%mm7, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
221 "psubusw %%mm2, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
222 "psrlw $7, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
223 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
224 "movq (%%esi,%%eax), %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
225 "movq (%%esi), %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
226 "punpckhbw %%mm0, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
227 "punpckhbw %%mm0, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
228 "pmullw %%mm4, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
229 "pmullw %%mm5, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
230 "paddusw %%mm3, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
231 "movq (%%esi,%%ebx), %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
232 "punpckhbw %%mm0, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
233 "pmullw %%mm6, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
234 "psubusw %%mm3, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
235 "movq (%%esi,%%eax,2), %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
236 "punpckhbw %%mm0, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
237 "addl $8, %%esi \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
238 "pmullw %%mm7, %%mm3 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
239 "psubusw %%mm3, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
240 "psrlw $7, %%mm2 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
241 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
242 "packuswb %%mm2, %%mm1 \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
243 "movq %%mm1, (%%edi) \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
244 "addl $8, %%edi \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
245 "decl %%ecx \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
246 "jnz 4b \n\t" |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
247 : "=S"(crap1), "=D"(crap2) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
248 : "c"(w>>3), "S"(s), "D"(d), "a"(ssd), "b"(-ssd), "d"(filter) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
249 ); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
250 for (j=w-(w&7); j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
251 d[j] = (-9*s[j-ssd] + 111*s[j] + 29*s[j+ssd] - 3*s[j+ssd+ssd])>>7; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
252 d += ds; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
253 s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
254 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
255 for (j=0; j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
256 d[j] = (s[j+ssd] + 3*s[j])>>2; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
257 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
258 if (!up) memcpy(d, s, w); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
259 asm volatile("emms \n\t" : : : "memory"); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
260 } |
10020 | 261 #endif |
262 | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
263 static inline int clamp(int a) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
264 { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
265 // If a<512, this is equivalent to: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
266 // return (a<0) ? 0 : ( (a>255) ? 255 : a); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
267 return (~(a>>31)) & (a | ((a<<23)>>31)); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
268 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
269 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
270 static void qpel_li_C(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
10020 | 271 { |
272 int i, j, ssd=ss; | |
273 if (up) { | |
274 ssd = -ss; | |
275 memcpy(d, s, w); | |
276 d += ds; | |
277 s += ss; | |
278 } | |
279 for (i=h-1; i; i--) { | |
280 for (j=0; j<w; j++) | |
281 d[j] = (s[j+ssd] + 3*s[j])>>2; | |
282 d += ds; | |
283 s += ss; | |
284 } | |
285 if (!up) memcpy(d, s, w); | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
286 } |
9514 | 287 |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
288 static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
289 { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
290 int i, j, ssd=ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
291 if (up) { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
292 ssd = -ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
293 memcpy(d, s, w); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
294 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
295 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
296 for (j=0; j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
297 d[j] = (s[j+ssd] + 3*s[j] + 2)>>2; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
298 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
299 for (i=h-3; i; i--) { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
300 for (j=0; j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
301 d[j] = clamp((-9*s[j-ssd] + 111*s[j] + 29*s[j+ssd] - 3*s[j+ssd+ssd] + 64)>>7); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
302 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
303 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
304 for (j=0; j<w; j++) |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
305 d[j] = (s[j+ssd] + 3*s[j] + 2)>>2; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
306 d += ds; s += ss; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
307 if (!up) memcpy(d, s, w); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
308 } |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
309 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
310 static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
311 static void (*qpel_4tap)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up); |
9514 | 312 |
313 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi) | |
314 { | |
315 int ret; | |
316 mp_image_t *dmpi; | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
317 void (*qpel)(unsigned char *, unsigned char *, int, int, int, int, int); |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
318 |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
319 switch (vf->priv->mode) { |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
320 case 2: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
321 qpel = qpel_li; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
322 break; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
323 case 3: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
324 // TODO: add 3tap filter |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
325 qpel = qpel_4tap; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
326 break; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
327 case 4: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
328 qpel = qpel_4tap; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
329 break; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
330 } |
9514 | 331 |
332 switch (vf->priv->mode) { | |
333 case 0: | |
334 dmpi = vf_get_image(vf->next, mpi->imgfmt, | |
335 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, | |
336 mpi->width, mpi->height/2); | |
337 memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2, | |
338 dmpi->stride[0], mpi->stride[0]*2); | |
339 if (mpi->flags & MP_IMGFLAG_PLANAR) { | |
340 memcpy_pic(dmpi->planes[1], mpi->planes[1], | |
341 mpi->chroma_width, mpi->chroma_height/2, | |
342 dmpi->stride[1], mpi->stride[1]*2); | |
343 memcpy_pic(dmpi->planes[2], mpi->planes[2], | |
344 mpi->chroma_width, mpi->chroma_height/2, | |
345 dmpi->stride[2], mpi->stride[2]*2); | |
346 } | |
347 ret = vf_next_put_image(vf, dmpi); | |
10052
b358b7509e1a
sort of a hack, but at least this lets the framerate-increasing
rfelker
parents:
10049
diff
changeset
|
348 vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); |
9514 | 349 |
350 memcpy_pic(dmpi->planes[0], mpi->planes[0] + mpi->stride[0], | |
351 mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2); | |
352 if (mpi->flags & MP_IMGFLAG_PLANAR) { | |
353 memcpy_pic(dmpi->planes[1], mpi->planes[1] + mpi->stride[1], | |
354 mpi->chroma_width, mpi->chroma_height/2, | |
355 dmpi->stride[1], mpi->stride[1]*2); | |
356 memcpy_pic(dmpi->planes[2], mpi->planes[2] + mpi->stride[2], | |
357 mpi->chroma_width, mpi->chroma_height/2, | |
358 dmpi->stride[2], mpi->stride[2]*2); | |
359 } | |
360 return vf_next_put_image(vf, dmpi) || ret; | |
361 case 1: | |
362 dmpi = vf_get_image(vf->next, mpi->imgfmt, | |
363 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, | |
364 mpi->width, mpi->height); | |
365 my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2, | |
366 dmpi->stride[0]*2, mpi->stride[0]*2); | |
367 deint(dmpi->planes[0], dmpi->stride[0], mpi->planes[0], mpi->stride[0], mpi->w, mpi->h, 0); | |
368 if (mpi->flags & MP_IMGFLAG_PLANAR) { | |
369 my_memcpy_pic(dmpi->planes[1], mpi->planes[1], | |
370 mpi->chroma_width, mpi->chroma_height/2, | |
371 dmpi->stride[1]*2, mpi->stride[1]*2); | |
372 my_memcpy_pic(dmpi->planes[2], mpi->planes[2], | |
373 mpi->chroma_width, mpi->chroma_height/2, | |
374 dmpi->stride[2]*2, mpi->stride[2]*2); | |
375 deint(dmpi->planes[1], dmpi->stride[1], mpi->planes[1], mpi->stride[1], | |
376 mpi->chroma_width, mpi->chroma_height, 0); | |
377 deint(dmpi->planes[2], dmpi->stride[2], mpi->planes[2], mpi->stride[2], | |
378 mpi->chroma_width, mpi->chroma_height, 0); | |
379 } | |
380 ret = vf_next_put_image(vf, dmpi); | |
10052
b358b7509e1a
sort of a hack, but at least this lets the framerate-increasing
rfelker
parents:
10049
diff
changeset
|
381 vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); |
9514 | 382 |
383 my_memcpy_pic(dmpi->planes[0] + dmpi->stride[0], mpi->planes[0] + mpi->stride[0], | |
384 mpi->w, mpi->h/2, dmpi->stride[0]*2, mpi->stride[0]*2); | |
385 deint(dmpi->planes[0], dmpi->stride[0], mpi->planes[0], mpi->stride[0], mpi->w, mpi->h, 1); | |
386 if (mpi->flags & MP_IMGFLAG_PLANAR) { | |
387 my_memcpy_pic(dmpi->planes[1] + dmpi->stride[1], mpi->planes[1] + mpi->stride[1], | |
388 mpi->chroma_width, mpi->chroma_height/2, | |
389 dmpi->stride[1]*2, mpi->stride[1]*2); | |
390 my_memcpy_pic(dmpi->planes[2] + dmpi->stride[2], mpi->planes[2] + mpi->stride[2], | |
391 mpi->chroma_width, mpi->chroma_height/2, | |
392 dmpi->stride[2]*2, mpi->stride[2]*2); | |
393 deint(dmpi->planes[1], dmpi->stride[1], mpi->planes[1], mpi->stride[1], | |
394 mpi->chroma_width, mpi->chroma_height, 1); | |
395 deint(dmpi->planes[2], dmpi->stride[2], mpi->planes[2], mpi->stride[2], | |
396 mpi->chroma_width, mpi->chroma_height, 1); | |
397 } | |
398 return vf_next_put_image(vf, dmpi) || ret; | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
399 case 2: |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
400 case 3: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
401 case 4: |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
402 dmpi = vf_get_image(vf->next, mpi->imgfmt, |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
403 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
404 mpi->width, mpi->height/2); |
10020 | 405 qpel(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2, |
406 dmpi->stride[0], mpi->stride[0]*2, 0); | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
407 if (mpi->flags & MP_IMGFLAG_PLANAR) { |
10020 | 408 qpel(dmpi->planes[1], mpi->planes[1], |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
409 mpi->chroma_width, mpi->chroma_height/2, |
10020 | 410 dmpi->stride[1], mpi->stride[1]*2, 0); |
411 qpel(dmpi->planes[2], mpi->planes[2], | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
412 mpi->chroma_width, mpi->chroma_height/2, |
10020 | 413 dmpi->stride[2], mpi->stride[2]*2, 0); |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
414 } |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
415 ret = vf_next_put_image(vf, dmpi); |
10052
b358b7509e1a
sort of a hack, but at least this lets the framerate-increasing
rfelker
parents:
10049
diff
changeset
|
416 vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
417 |
10020 | 418 qpel(dmpi->planes[0], mpi->planes[0] + mpi->stride[0], |
419 mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2, 1); | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
420 if (mpi->flags & MP_IMGFLAG_PLANAR) { |
10020 | 421 qpel(dmpi->planes[1], mpi->planes[1] + mpi->stride[1], |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
422 mpi->chroma_width, mpi->chroma_height/2, |
10020 | 423 dmpi->stride[1], mpi->stride[1]*2, 1); |
424 qpel(dmpi->planes[2], mpi->planes[2] + mpi->stride[2], | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
425 mpi->chroma_width, mpi->chroma_height/2, |
10020 | 426 dmpi->stride[2], mpi->stride[2]*2, 1); |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
427 } |
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
428 return vf_next_put_image(vf, dmpi) || ret; |
9514 | 429 } |
430 return 0; | |
431 } | |
432 | |
433 static int query_format(struct vf_instance_s* vf, unsigned int fmt) | |
434 { | |
435 /* FIXME - figure out which other formats work */ | |
436 switch (fmt) { | |
437 case IMGFMT_YV12: | |
438 case IMGFMT_IYUV: | |
439 case IMGFMT_I420: | |
440 return vf_next_query_format(vf, fmt); | |
441 } | |
442 return 0; | |
443 } | |
444 | |
445 static int config(struct vf_instance_s* vf, | |
446 int width, int height, int d_width, int d_height, | |
447 unsigned int flags, unsigned int outfmt) | |
448 { | |
449 switch (vf->priv->mode) { | |
450 case 0: | |
10009
69f10d08c3be
new mode for tfields filter -- shifts fields by a quarter-pixel so the
rfelker
parents:
9593
diff
changeset
|
451 case 2: |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
452 case 3: |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
453 case 4: |
9514 | 454 return vf_next_config(vf,width,height/2,d_width,d_height,flags,outfmt); |
455 case 1: | |
456 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | |
457 } | |
458 return 0; | |
459 } | |
460 | |
461 static void uninit(struct vf_instance_s* vf) | |
462 { | |
463 free(vf->priv); | |
464 } | |
465 | |
466 static int open(vf_instance_t *vf, char* args) | |
467 { | |
468 struct vf_priv_s *p; | |
469 vf->config = config; | |
470 vf->put_image = put_image; | |
471 vf->query_format = query_format; | |
472 vf->uninit = uninit; | |
473 vf->default_reqs = VFCAP_ACCEPT_STRIDE; | |
474 vf->priv = p = calloc(1, sizeof(struct vf_priv_s)); | |
475 vf->priv->mode = 0; | |
476 if (args) sscanf(args, "%d", &vf->priv->mode); | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
477 qpel_li = qpel_li_C; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
478 qpel_4tap = qpel_4tap_C; |
10020 | 479 #ifdef HAVE_MMX |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
480 if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX; |
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
481 if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX; |
10020 | 482 #endif |
483 #ifdef HAVE_MMX2 | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
484 if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2; |
10020 | 485 #endif |
486 #ifdef HAVE_3DNOW | |
10049
765c2276aa0c
more 10l's -- fortunately part of the bug was that the buggy code didn't get called...
rfelker
parents:
10020
diff
changeset
|
487 if(gCpuCaps.has3DNow) qpel_li = qpel_li_3DNOW; |
10020 | 488 #endif |
9514 | 489 return 1; |
490 } | |
491 | |
492 vf_info_t vf_info_tfields = { | |
493 "temporal field separation", | |
494 "tfields", | |
495 "Rich Felker", | |
496 "", | |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9514
diff
changeset
|
497 open, |
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9514
diff
changeset
|
498 NULL |
9514 | 499 }; |
500 | |
501 |