[svn] / trunk / xvidcore / src / image / x86_asm / interpolate8x8_3dne.asm Repository:
ViewVC logotype

Annotation of /trunk/xvidcore/src/image/x86_asm/interpolate8x8_3dne.asm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1793 - (view) (download)

1 : edgomez 1382 ;/*****************************************************************************
2 : edgomez 851 ; *
3 : edgomez 1382 ; * XVID MPEG-4 VIDEO CODEC
4 :     ; * - 3dne pipeline optimized 8x8 block-based halfpel interpolation -
5 : edgomez 851 ; *
6 : edgomez 1382 ; * Copyright(C) 2002 Jaan Kalda
7 : edgomez 851 ; *
8 : edgomez 1382 ; * This program is free software ; you can redistribute it and/or modify
9 :     ; * it under the terms of the GNU General Public License as published by
10 :     ; * the Free Software Foundation ; either version 2 of the License, or
11 :     ; * (at your option) any later version.
12 : edgomez 851 ; *
13 : edgomez 1382 ; * This program is distributed in the hope that it will be useful,
14 :     ; * but WITHOUT ANY WARRANTY ; without even the implied warranty of
15 :     ; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 :     ; * GNU General Public License for more details.
17 : edgomez 851 ; *
18 : edgomez 1382 ; * You should have received a copy of the GNU General Public License
19 :     ; * along with this program ; if not, write to the Free Software
20 :     ; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 : edgomez 851 ; *
22 : edgomez 1382 ; ****************************************************************************/
23 : edgomez 851
24 : edgomez 1382 ; these 3dne functions are compatible with iSSE, but are optimized specifically
25 :     ; for K7 pipelines
26 : edgomez 851
27 : edgomez 1382 BITS 32
28 : edgomez 851
29 : edgomez 1382 %macro cglobal 1
30 : edgomez 851 %ifdef PREFIX
31 : edgomez 1535 %ifdef MARK_FUNCS
32 : edgomez 1540 global _%1:function %1.endfunc-%1
33 :     %define %1 _%1:function %1.endfunc-%1
34 : Isibaar 1793 %define ENDFUNC .endfunc
35 : edgomez 1535 %else
36 :     global _%1
37 :     %define %1 _%1
38 : Isibaar 1793 %define ENDFUNC
39 : edgomez 1535 %endif
40 : edgomez 851 %else
41 : edgomez 1535 %ifdef MARK_FUNCS
42 : edgomez 1540 global %1:function %1.endfunc-%1
43 : Isibaar 1793 %define ENDFUNC .endfunc
44 : edgomez 1535 %else
45 :     global %1
46 : Isibaar 1793 %define ENDFUNC
47 : edgomez 1535 %endif
48 : edgomez 851 %endif
49 :     %endmacro
50 : edgomez 1382
51 :     ;=============================================================================
52 :     ; Read only data
53 :     ;=============================================================================
54 :    
55 : edgomez 851 %ifdef FORMAT_COFF
56 : edgomez 1519 SECTION .rodata
57 : edgomez 851 %else
58 : edgomez 1519 SECTION .rodata align=16
59 : edgomez 851 %endif
60 :    
61 : edgomez 1382 ALIGN 16
62 :     mmx_one:
63 :     times 8 db 1
64 : edgomez 851
65 : edgomez 1382 ALIGN 8
66 : edgomez 851 mm_minusone:
67 : edgomez 1382 dd -1,-1
68 : edgomez 851
69 : edgomez 1382 ;=============================================================================
70 :     ; Macros
71 :     ;=============================================================================
72 : edgomez 851
73 : edgomez 1382 %macro nop4 0
74 :     DB 08Dh,074h,026h,0
75 :     %endmacro
76 :    
77 :     ;=============================================================================
78 :     ; Macros
79 :     ;=============================================================================
80 :    
81 :     SECTION .text
82 :    
83 : edgomez 851 cglobal interpolate8x8_halfpel_h_3dne
84 :     cglobal interpolate8x8_halfpel_v_3dne
85 :     cglobal interpolate8x8_halfpel_hv_3dne
86 :    
87 : suxen_drol 1632 cglobal interpolate8x4_halfpel_h_3dne
88 :     cglobal interpolate8x4_halfpel_v_3dne
89 :     cglobal interpolate8x4_halfpel_hv_3dne
90 :    
91 : edgomez 1382 ;-----------------------------------------------------------------------------
92 : edgomez 851 ;
93 :     ; void interpolate8x8_halfpel_h_3dne(uint8_t * const dst,
94 : edgomez 1382 ; const uint8_t * const src,
95 :     ; const uint32_t stride,
96 :     ; const uint32_t rounding);
97 : edgomez 851 ;
98 : edgomez 1382 ;-----------------------------------------------------------------------------
99 : edgomez 851
100 :     %macro COPY_H_SSE_RND0 1
101 :     %if (%1)
102 : edgomez 1382 movq mm0, [eax]
103 : edgomez 851 %else
104 : suxen_drol 1787 movq mm0, [eax+0]
105 :     ; ---
106 :     ; nasm >0.99.x rejects the original statement:
107 :     ; movq mm0, [dword eax]
108 :     ; as it is ambiguous. for this statement nasm <0.99.x would
109 :     ; generate "movq mm0,[eax+0]"
110 :     ; ---
111 : edgomez 851 %endif
112 :     pavgb mm0, [eax+1]
113 : edgomez 1382 movq mm1, [eax+edx]
114 : edgomez 851 pavgb mm1, [eax+edx+1]
115 : edgomez 1382 lea eax, [eax+2*edx]
116 :     movq [ecx], mm0
117 :     movq [ecx+edx], mm1
118 : edgomez 851 %endmacro
119 :    
120 :     %macro COPY_H_SSE_RND1 0
121 :     movq mm0, [eax]
122 :     movq mm1, [eax+edx]
123 :     movq mm4, mm0
124 :     movq mm5, mm1
125 : edgomez 1382 movq mm2, [eax+1]
126 : edgomez 851 movq mm3, [eax+edx+1]
127 :     pavgb mm0, mm2
128 :     pxor mm2, mm4
129 :     pavgb mm1, mm3
130 : edgomez 1382 lea eax, [eax+2*edx]
131 : edgomez 851 pxor mm3, mm5
132 :     pand mm2, mm7
133 :     pand mm3, mm7
134 :     psubb mm0, mm2
135 :     movq [ecx], mm0
136 :     psubb mm1, mm3
137 : edgomez 1382 movq [ecx+edx], mm1
138 : edgomez 851 %endmacro
139 :    
140 : edgomez 1382 ALIGN 16
141 : edgomez 851 interpolate8x8_halfpel_h_3dne:
142 :    
143 :     mov eax, [esp+ 8] ; Src
144 :     mov edx, [esp+12] ; stride
145 :     dec dword [esp+16]; rounding
146 :    
147 :     jz .rounding1
148 :     mov ecx, [esp+ 4] ; Dst
149 :    
150 :     COPY_H_SSE_RND0 0
151 :     lea ecx,[ecx+2*edx]
152 :     COPY_H_SSE_RND0 1
153 :     lea ecx,[ecx+2*edx]
154 :     COPY_H_SSE_RND0 1
155 :     lea ecx,[ecx+2*edx]
156 :     COPY_H_SSE_RND0 1
157 :     ret
158 :    
159 : Isibaar 1793 .rounding1:
160 : edgomez 1382 ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
161 : edgomez 851 mov ecx, [esp+ 4] ; Dst
162 :     movq mm7, [mmx_one]
163 :     COPY_H_SSE_RND1
164 :     lea ecx, [ecx+2*edx]
165 :     COPY_H_SSE_RND1
166 :     lea ecx,[ecx+2*edx]
167 :     COPY_H_SSE_RND1
168 :     lea ecx,[ecx+2*edx]
169 :     COPY_H_SSE_RND1
170 :     ret
171 : Isibaar 1793 ENDFUNC
172 : edgomez 851
173 : edgomez 1382 ;-----------------------------------------------------------------------------
174 : edgomez 851 ;
175 :     ; void interpolate8x8_halfpel_v_3dne(uint8_t * const dst,
176 : edgomez 1382 ; const uint8_t * const src,
177 :     ; const uint32_t stride,
178 :     ; const uint32_t rounding);
179 : edgomez 851 ;
180 : edgomez 1382 ;-----------------------------------------------------------------------------
181 : edgomez 851
182 : edgomez 1382 ALIGN 16
183 : edgomez 851 interpolate8x8_halfpel_v_3dne:
184 :    
185 :     mov eax, [esp+ 8] ; Src
186 :     mov edx, [esp+12] ; stride
187 :     dec dword [esp+16]; rounding
188 :    
189 :     ; we process 2 line at a time
190 :    
191 :     jz .rounding1
192 :     pxor mm2,mm2
193 : edgomez 1382 movq mm0, [eax]
194 :     movq mm1, [eax+edx]
195 :     por mm2, [eax+2*edx]
196 : edgomez 851 mov ecx, [esp+ 4] ; Dst
197 : edgomez 1382 lea eax, [eax+2*edx]
198 :     pxor mm4, mm4
199 : edgomez 851 pavgb mm0, mm1
200 : edgomez 1382 pavgb mm1, mm2
201 :     movq [byte ecx], mm0
202 :     movq [ecx+edx], mm1
203 :     pxor mm6, mm6
204 :     add eax, edx
205 :     lea ecx, [ecx+2*edx]
206 :     movq mm3, [byte eax]
207 :     por mm4, [eax+edx]
208 :     lea eax, [eax+2*edx]
209 : edgomez 851 pavgb mm2, mm3
210 :     pavgb mm3, mm4
211 : edgomez 1382 movq [ecx], mm2
212 :     movq [ecx+edx], mm3
213 :     lea ecx, [byte ecx+2*edx]
214 :     movq mm5, [byte eax]
215 :     por mm6, [eax+edx]
216 :     lea eax, [eax+2*edx]
217 : edgomez 851 pavgb mm4, mm5
218 :     pavgb mm5, mm6
219 : edgomez 1382 movq [ecx], mm4
220 :     movq [ecx+edx], mm5
221 :     lea ecx, [ecx+2*edx]
222 :     movq mm7, [eax]
223 :     movq mm0, [eax+edx]
224 : edgomez 851 pavgb mm6, mm7
225 :     pavgb mm7, mm0
226 : edgomez 1382 movq [ecx], mm6
227 :     movq [ecx+edx], mm7
228 : edgomez 851 ret
229 :    
230 : edgomez 1382 ALIGN 8
231 : Isibaar 1793 .rounding1:
232 : edgomez 1382 pcmpeqb mm0, mm0
233 :     psubusb mm0, [eax]
234 :     add eax, edx
235 : edgomez 851 mov ecx, [esp+ 4] ; Dst
236 :     push esi
237 : edgomez 1382 pcmpeqb mm1, mm1
238 :     pcmpeqb mm2, mm2
239 :     mov esi, mm_minusone
240 :     psubusb mm1, [byte eax]
241 :     psubusb mm2, [eax+edx]
242 :     lea eax, [eax+2*edx]
243 : edgomez 851 movq mm6, [esi]
244 :     movq mm7, [esi]
245 :     pavgb mm0, mm1
246 :     pavgb mm1, mm2
247 : edgomez 1382 psubusb mm6, mm0
248 :     psubusb mm7, mm1
249 : edgomez 851 movq [ecx], mm6
250 :     movq [ecx+edx], mm7
251 : edgomez 1382 lea ecx, [ecx+2*edx]
252 :     pcmpeqb mm3, mm3
253 :     pcmpeqb mm4, mm4
254 :     psubusb mm3, [eax]
255 :     psubusb mm4, [eax+edx]
256 :     lea eax, [eax+2*edx]
257 : edgomez 851 pavgb mm2, mm3
258 :     pavgb mm3, mm4
259 :     movq mm0, [esi]
260 :     movq mm1, [esi]
261 : edgomez 1382 psubusb mm0, mm2
262 :     psubusb mm1, mm3
263 : edgomez 851 movq [ecx], mm0
264 :     movq [ecx+edx], mm1
265 :     lea ecx,[ecx+2*edx]
266 :    
267 : edgomez 1382 pcmpeqb mm5, mm5
268 :     pcmpeqb mm6, mm6
269 :     psubusb mm5, [eax]
270 :     psubusb mm6, [eax+edx]
271 :     lea eax, [eax+2*edx]
272 : edgomez 851 pavgb mm4, mm5
273 :     pavgb mm5, mm6
274 :     movq mm2, [esi]
275 :     movq mm3, [esi]
276 : edgomez 1382 psubusb mm2, mm4
277 :     psubusb mm3, mm5
278 : edgomez 851 movq [ecx], mm2
279 :     movq [ecx+edx], mm3
280 : edgomez 1382 lea ecx, [ecx+2*edx]
281 :     pcmpeqb mm7, mm7
282 :     pcmpeqb mm0, mm0
283 :     psubusb mm7, [eax]
284 :     psubusb mm0, [eax+edx]
285 : edgomez 851 pavgb mm6, mm7
286 :     pavgb mm7, mm0
287 :     movq mm4, [esi]
288 :     movq mm5, [esi]
289 : edgomez 1382 psubusb mm4, mm6
290 : edgomez 851 pop esi
291 : edgomez 1382 psubusb mm5, mm7
292 : edgomez 851 movq [ecx], mm4
293 :     movq [ecx+edx], mm5
294 :     ret
295 : Isibaar 1793 ENDFUNC
296 : edgomez 1382
297 :     ;-----------------------------------------------------------------------------
298 : edgomez 851 ;
299 :     ; void interpolate8x8_halfpel_hv_3dne(uint8_t * const dst,
300 : edgomez 1382 ; const uint8_t * const src,
301 :     ; const uint32_t stride,
302 :     ; const uint32_t rounding);
303 : edgomez 851 ;
304 :     ;
305 : edgomez 1382 ;-----------------------------------------------------------------------------
306 : edgomez 851
307 :     ; The trick is to correct the result of 'pavgb' with some combination of the
308 :     ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t).
309 :     ; The boolean relations are:
310 : edgomez 1382 ; (i+j+k+l+3)/4 = (s+t+1)/2 - (ij&kl)&st
311 : edgomez 851 ; (i+j+k+l+2)/4 = (s+t+1)/2 - (ij|kl)&st
312 :     ; (i+j+k+l+1)/4 = (s+t+1)/2 - (ij&kl)|st
313 :     ; (i+j+k+l+0)/4 = (s+t+1)/2 - (ij|kl)|st
314 :     ; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t.
315 :    
316 :     ; Moreover, we process 2 lines at a times, for better overlapping (~15% faster).
317 :    
318 :     %macro COPY_HV_SSE_RND0 0
319 :    
320 : edgomez 1382 movq mm0, [eax+edx]
321 :     movq mm1, [eax+edx+1]
322 : edgomez 851
323 : edgomez 1382 movq mm6, mm0
324 :     pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step
325 :     lea eax, [eax+2*edx]
326 :     pxor mm1, mm6 ; mm1=(j^k). preserved for next step
327 : edgomez 851
328 : edgomez 1382 por mm3, mm1 ; ij |= jk
329 :     movq mm6, mm2
330 :     pxor mm6, mm0 ; mm6 = s^t
331 :     pand mm3, mm6 ; (ij|jk) &= st
332 :     pavgb mm2, mm0 ; mm2 = (s+t+1)/2
333 :     movq mm6, [eax]
334 :     pand mm3, mm7 ; mask lsb
335 :     psubb mm2, mm3 ; apply.
336 : edgomez 851
337 : edgomez 1382 movq [ecx], mm2
338 : edgomez 851
339 : edgomez 1382 movq mm2, [eax]
340 :     movq mm3, [eax+1]
341 :     pavgb mm2, mm3 ; preserved for next iteration
342 :     pxor mm3, mm6 ; preserved for next iteration
343 : edgomez 851
344 : edgomez 1382 por mm1, mm3
345 :     movq mm6, mm0
346 :     pxor mm6, mm2
347 :     pand mm1, mm6
348 :     pavgb mm0, mm2
349 : edgomez 851
350 : edgomez 1382 pand mm1, mm7
351 :     psubb mm0, mm1
352 : edgomez 851
353 : edgomez 1382 movq [ecx+edx], mm0
354 : edgomez 851 %endmacro
355 :    
356 :     %macro COPY_HV_SSE_RND1 0
357 : edgomez 1382 movq mm0, [eax+edx]
358 :     movq mm1, [eax+edx+1]
359 : edgomez 851
360 : edgomez 1382 movq mm6, mm0
361 :     pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step
362 :     lea eax,[eax+2*edx]
363 :     pxor mm1, mm6 ; mm1=(j^k). preserved for next step
364 : edgomez 851
365 : edgomez 1382 pand mm3, mm1
366 :     movq mm6, mm2
367 :     pxor mm6, mm0
368 :     por mm3, mm6
369 :     pavgb mm2, mm0
370 :     movq mm6, [eax]
371 :     pand mm3, mm7
372 :     psubb mm2, mm3
373 : edgomez 851
374 : edgomez 1382 movq [ecx], mm2
375 : edgomez 851
376 : edgomez 1382 movq mm2, [eax]
377 :     movq mm3, [eax+1]
378 :     pavgb mm2, mm3 ; preserved for next iteration
379 :     pxor mm3, mm6 ; preserved for next iteration
380 : edgomez 851
381 : edgomez 1382 pand mm1, mm3
382 :     movq mm6, mm0
383 :     pxor mm6, mm2
384 :     por mm1, mm6
385 :     pavgb mm0, mm2
386 :     pand mm1, mm7
387 :     psubb mm0, mm1
388 :     movq [ecx+edx], mm0
389 : edgomez 851 %endmacro
390 :    
391 : edgomez 1382 ALIGN 16
392 : edgomez 851 interpolate8x8_halfpel_hv_3dne:
393 : edgomez 1382 mov eax, [esp+ 8] ; Src
394 :     mov edx, [esp+12] ; stride
395 :     dec dword [esp+16] ; rounding
396 : edgomez 851
397 :     ; loop invariants: mm2=(i+j+1)/2 and mm3= i^j
398 :     movq mm2, [eax]
399 :     movq mm3, [eax+1]
400 :     movq mm6, mm2
401 :     pavgb mm2, mm3
402 : edgomez 1382 pxor mm3, mm6 ; mm2/mm3 ready
403 :     mov ecx, [esp+ 4] ; Dst
404 : edgomez 851 movq mm7, [mmx_one]
405 :    
406 :     jz near .rounding1
407 : edgomez 1382 lea ebp,[byte ebp]
408 : edgomez 851 COPY_HV_SSE_RND0
409 : edgomez 1382 lea ecx,[ecx+2*edx]
410 : edgomez 851 COPY_HV_SSE_RND0
411 : edgomez 1382 lea ecx,[ecx+2*edx]
412 : edgomez 851 COPY_HV_SSE_RND0
413 : edgomez 1382 lea ecx,[ecx+2*edx]
414 : edgomez 851 COPY_HV_SSE_RND0
415 :     ret
416 :    
417 : edgomez 1382 ALIGN 16
418 : Isibaar 1793 .rounding1:
419 : edgomez 851 COPY_HV_SSE_RND1
420 : edgomez 1382 lea ecx,[ecx+2*edx]
421 : edgomez 851 COPY_HV_SSE_RND1
422 : edgomez 1382 lea ecx,[ecx+2*edx]
423 : edgomez 851 COPY_HV_SSE_RND1
424 : edgomez 1382 lea ecx,[ecx+2*edx]
425 : edgomez 851 COPY_HV_SSE_RND1
426 : edgomez 1382 ret
427 : Isibaar 1793 ENDFUNC
428 : edgomez 1540
429 : suxen_drol 1632 ;-----------------------------------------------------------------------------
430 :     ;
431 :     ; void interpolate8x4_halfpel_h_3dne(uint8_t * const dst,
432 :     ; const uint8_t * const src,
433 :     ; const uint32_t stride,
434 :     ; const uint32_t rounding);
435 :     ;
436 :     ;-----------------------------------------------------------------------------
437 :    
438 :     ALIGN 16
439 :     interpolate8x4_halfpel_h_3dne:
440 :    
441 :     mov eax, [esp+ 8] ; Src
442 :     mov edx, [esp+12] ; stride
443 :     dec dword [esp+16]; rounding
444 :    
445 :     jz .rounding1
446 :     mov ecx, [esp+ 4] ; Dst
447 :    
448 :     COPY_H_SSE_RND0 0
449 :     lea ecx,[ecx+2*edx]
450 :     COPY_H_SSE_RND0 1
451 :     ret
452 :    
453 : Isibaar 1793 .rounding1:
454 : suxen_drol 1632 ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
455 :     mov ecx, [esp+ 4] ; Dst
456 :     movq mm7, [mmx_one]
457 :     COPY_H_SSE_RND1
458 :     lea ecx, [ecx+2*edx]
459 :     COPY_H_SSE_RND1
460 :     ret
461 : Isibaar 1793 ENDFUNC
462 : suxen_drol 1632
463 :     ;-----------------------------------------------------------------------------
464 :     ;
465 :     ; void interpolate8x4_halfpel_v_3dne(uint8_t * const dst,
466 :     ; const uint8_t * const src,
467 :     ; const uint32_t stride,
468 :     ; const uint32_t rounding);
469 :     ;
470 :     ;-----------------------------------------------------------------------------
471 :    
472 :     ALIGN 16
473 :     interpolate8x4_halfpel_v_3dne:
474 :    
475 :     mov eax, [esp+ 8] ; Src
476 :     mov edx, [esp+12] ; stride
477 :     dec dword [esp+16]; rounding
478 :    
479 :     ; we process 2 line at a time
480 :    
481 :     jz .rounding1
482 :     pxor mm2,mm2
483 :     movq mm0, [eax]
484 :     movq mm1, [eax+edx]
485 :     por mm2, [eax+2*edx] ; Something like preload (pipelining)
486 :     mov ecx, [esp+ 4] ; Dst
487 :     lea eax, [eax+2*edx]
488 :     pxor mm4, mm4
489 :     pavgb mm0, mm1
490 :     pavgb mm1, mm2
491 :     movq [byte ecx], mm0
492 :     movq [ecx+edx], mm1
493 :    
494 :     pxor mm6, mm6
495 :     add eax, edx
496 :     lea ecx, [ecx+2*edx]
497 :     movq mm3, [byte eax]
498 :     por mm4, [eax+edx]
499 :     lea eax, [eax+2*edx]
500 :     pavgb mm2, mm3
501 :     pavgb mm3, mm4
502 :     movq [ecx], mm2
503 :     movq [ecx+edx], mm3
504 :    
505 :     ret
506 :    
507 :     ALIGN 8
508 : Isibaar 1793 .rounding1:
509 : suxen_drol 1632 pcmpeqb mm0, mm0
510 :     psubusb mm0, [eax] ; eax==line0
511 :     add eax, edx ; eax==line1
512 :     mov ecx, [esp+ 4] ; Dst
513 :    
514 :     push esi
515 :    
516 :     pcmpeqb mm1, mm1
517 :     pcmpeqb mm2, mm2
518 :     mov esi, mm_minusone
519 :     psubusb mm1, [byte eax] ; line1
520 :     psubusb mm2, [eax+edx] ; line2
521 :     lea eax, [eax+2*edx] ; eax==line3
522 :     movq mm6, [esi]
523 :     movq mm7, [esi]
524 :     pavgb mm0, mm1
525 :     pavgb mm1, mm2
526 :     psubusb mm6, mm0
527 :     psubusb mm7, mm1
528 :     movq [ecx], mm6 ; store line0
529 :     movq [ecx+edx], mm7 ; store line1
530 :    
531 :     lea ecx, [ecx+2*edx]
532 :     pcmpeqb mm3, mm3
533 :     pcmpeqb mm4, mm4
534 :     psubusb mm3, [eax] ; line3
535 :     psubusb mm4, [eax+edx] ; line4
536 :     lea eax, [eax+2*edx] ; eax==line 5
537 :     pavgb mm2, mm3
538 :     pavgb mm3, mm4
539 :     movq mm0, [esi]
540 :     movq mm1, [esi]
541 :     psubusb mm0, mm2
542 :     psubusb mm1, mm3
543 :     movq [ecx], mm0
544 :     movq [ecx+edx], mm1
545 :    
546 :     pop esi
547 :    
548 :     ret
549 :    
550 : Isibaar 1793 ENDFUNC
551 : suxen_drol 1632
552 :     ;-----------------------------------------------------------------------------
553 :     ;
554 :     ; void interpolate8x4_halfpel_hv_3dne(uint8_t * const dst,
555 :     ; const uint8_t * const src,
556 :     ; const uint32_t stride,
557 :     ; const uint32_t rounding);
558 :     ;
559 :     ;
560 :     ;-----------------------------------------------------------------------------
561 :    
562 :     ALIGN 16
563 :     interpolate8x4_halfpel_hv_3dne:
564 :     mov eax, [esp+ 8] ; Src
565 :     mov edx, [esp+12] ; stride
566 :     dec dword [esp+16] ; rounding
567 :    
568 :     ; loop invariants: mm2=(i+j+1)/2 and mm3= i^j
569 :     movq mm2, [eax]
570 :     movq mm3, [eax+1]
571 :     movq mm6, mm2
572 :     pavgb mm2, mm3
573 :     pxor mm3, mm6 ; mm2/mm3 ready
574 :     mov ecx, [esp+ 4] ; Dst
575 :     movq mm7, [mmx_one]
576 :    
577 :     jz near .rounding1
578 :     lea ebp,[byte ebp]
579 :     COPY_HV_SSE_RND0
580 :     lea ecx,[ecx+2*edx]
581 :     COPY_HV_SSE_RND0
582 :     ret
583 :    
584 :     ALIGN 16
585 : Isibaar 1793 .rounding1:
586 : suxen_drol 1632 COPY_HV_SSE_RND1
587 :     lea ecx,[ecx+2*edx]
588 :     COPY_HV_SSE_RND1
589 :     ret
590 : Isibaar 1793 ENDFUNC
591 : suxen_drol 1632
592 : Isibaar 1790
593 :     %ifidn __OUTPUT_FORMAT__,elf
594 :     section ".note.GNU-stack" noalloc noexec nowrite progbits
595 :     %endif
596 :    

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4