comparison i386/dsputil_mmx_avg.h @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents 00f608ae3791
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
19 * 19 *
20 * MMX optimization by Nick Kurshev <nickols_k@mail.ru> 20 * MMX optimization by Nick Kurshev <nickols_k@mail.ru>
21 * mostly rewritten by Michael Niedermayer <michaelni@gmx.at> 21 * mostly rewritten by Michael Niedermayer <michaelni@gmx.at>
22 * and improved by Zdenek Kabelac <kabi@users.sf.net> 22 * and improved by Zdenek Kabelac <kabi@users.sf.net>
23 */ 23 */
24 24
25 /* XXX: we use explicit registers to avoid a gcc 2.95.2 register asm 25 /* XXX: we use explicit registers to avoid a gcc 2.95.2 register asm
26 clobber bug - now it will work with 2.95.2 and also with -fPIC 26 clobber bug - now it will work with 2.95.2 and also with -fPIC
27 */ 27 */
28 static void DEF(put_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) 28 static void DEF(put_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
29 { 29 {
98 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 98 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
99 #else 99 #else
100 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 100 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
101 #endif 101 #endif
102 :"S"((long)src1Stride), "D"((long)dstStride) 102 :"S"((long)src1Stride), "D"((long)dstStride)
103 :"memory"); 103 :"memory");
104 } 104 }
105 105
106 106
107 static void DEF(put_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) 107 static void DEF(put_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
108 { 108 {
145 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 145 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
146 #else 146 #else
147 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 147 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
148 #endif 148 #endif
149 :"S"((long)src1Stride), "D"((long)dstStride) 149 :"S"((long)src1Stride), "D"((long)dstStride)
150 :"memory"); 150 :"memory");
151 //the following should be used, though better not with gcc ... 151 //the following should be used, though better not with gcc ...
152 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 152 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
153 :"r"(src1Stride), "r"(dstStride) 153 :"r"(src1Stride), "r"(dstStride)
154 :"memory");*/ 154 :"memory");*/
155 } 155 }
215 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 215 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
216 #else 216 #else
217 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 217 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
218 #endif 218 #endif
219 :"S"((long)src1Stride), "D"((long)dstStride) 219 :"S"((long)src1Stride), "D"((long)dstStride)
220 :"memory"); 220 :"memory");
221 //the following should be used, though better not with gcc ... 221 //the following should be used, though better not with gcc ...
222 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 222 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
223 :"r"(src1Stride), "r"(dstStride) 223 :"r"(src1Stride), "r"(dstStride)
224 :"memory");*/ 224 :"memory");*/
225 } 225 }
270 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 270 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
271 #else 271 #else
272 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 272 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
273 #endif 273 #endif
274 :"S"((long)src1Stride), "D"((long)dstStride) 274 :"S"((long)src1Stride), "D"((long)dstStride)
275 :"memory"); 275 :"memory");
276 } 276 }
277 277
278 278
279 static void DEF(avg_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) 279 static void DEF(avg_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
280 { 280 {
322 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 322 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
323 #else 323 #else
324 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 324 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
325 #endif 325 #endif
326 :"S"((long)src1Stride), "D"((long)dstStride) 326 :"S"((long)src1Stride), "D"((long)dstStride)
327 :"memory"); 327 :"memory");
328 //the following should be used, though better not with gcc ... 328 //the following should be used, though better not with gcc ...
329 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 329 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
330 :"r"(src1Stride), "r"(dstStride) 330 :"r"(src1Stride), "r"(dstStride)
331 :"memory");*/ 331 :"memory");*/
332 } 332 }
410 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 410 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
411 #else 411 #else
412 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 412 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
413 #endif 413 #endif
414 :"S"((long)src1Stride), "D"((long)dstStride) 414 :"S"((long)src1Stride), "D"((long)dstStride)
415 :"memory"); 415 :"memory");
416 //the following should be used, though better not with gcc ... 416 //the following should be used, though better not with gcc ...
417 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 417 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
418 :"r"(src1Stride), "r"(dstStride) 418 :"r"(src1Stride), "r"(dstStride)
419 :"memory");*/ 419 :"memory");*/
420 } 420 }
464 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 464 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
465 #else 465 #else
466 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 466 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
467 #endif 467 #endif
468 :"S"((long)src1Stride), "D"((long)dstStride) 468 :"S"((long)src1Stride), "D"((long)dstStride)
469 :"memory"); 469 :"memory");
470 //the following should be used, though better not with gcc ... 470 //the following should be used, though better not with gcc ...
471 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 471 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
472 :"r"(src1Stride), "r"(dstStride) 472 :"r"(src1Stride), "r"(dstStride)
473 :"memory");*/ 473 :"memory");*/
474 } 474 }
537 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 537 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
538 #else 538 #else
539 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 539 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
540 #endif 540 #endif
541 :"S"((long)src1Stride), "D"((long)dstStride) 541 :"S"((long)src1Stride), "D"((long)dstStride)
542 :"memory"); 542 :"memory");
543 //the following should be used, though better not with gcc ... 543 //the following should be used, though better not with gcc ...
544 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) 544 /* :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
545 :"r"(src1Stride), "r"(dstStride) 545 :"r"(src1Stride), "r"(dstStride)
546 :"memory");*/ 546 :"memory");*/
547 } 547 }
548 548
549 /* GL: this function does incorrect rounding if overflow */ 549 /* GL: this function does incorrect rounding if overflow */
550 static void DEF(put_no_rnd_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) 550 static void DEF(put_no_rnd_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
551 { 551 {
552 MOVQ_BONE(mm6); 552 MOVQ_BONE(mm6);
553 __asm __volatile( 553 __asm __volatile(
744 :"+g"(h), "+S"(pixels), "+D"(block) 744 :"+g"(h), "+S"(pixels), "+D"(block)
745 :"r" ((long)line_size) 745 :"r" ((long)line_size)
746 :"%"REG_a, "memory"); 746 :"%"REG_a, "memory");
747 } 747 }
748 748
749 // Note this is not correctly rounded, but this function is only used for b frames so it doesnt matter 749 // Note this is not correctly rounded, but this function is only used for b frames so it doesnt matter
750 static void DEF(avg_pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) 750 static void DEF(avg_pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
751 { 751 {
752 MOVQ_BONE(mm6); 752 MOVQ_BONE(mm6);
753 __asm __volatile( 753 __asm __volatile(
754 "lea (%3, %3), %%"REG_a" \n\t" 754 "lea (%3, %3), %%"REG_a" \n\t"