Revision 4bff9ef9 libswscale/rgb2rgb_template.c

View differences:

libswscale/rgb2rgb_template.c
12 12
#include <stddef.h>
13 13
#include <inttypes.h> /* for __WORDSIZE */
14 14

  
15
#include "asmalign.h"
16

  
17 15
#ifndef __WORDSIZE
18 16
// #warning You have misconfigured system and probably will lose performance!
19 17
#define __WORDSIZE MP_WORDSIZE
......
343 341
		"movq %3, %%mm5			\n\t"
344 342
		"movq %4, %%mm6			\n\t"
345 343
		"movq %5, %%mm7			\n\t"
346
		ASMALIGN16
344
		ASMALIGN(4)
347 345
		"1:				\n\t"
348 346
		PREFETCH" 32(%1)		\n\t"
349 347
		"movd	(%1), %%mm0		\n\t"
......
500 498
		"movq %3, %%mm5			\n\t"
501 499
		"movq %4, %%mm6			\n\t"
502 500
		"movq %5, %%mm7			\n\t"
503
		ASMALIGN16
501
		ASMALIGN(4)
504 502
		"1:				\n\t"
505 503
		PREFETCH" 32(%1)		\n\t"
506 504
		"movd	(%1), %%mm0		\n\t"
......
1355 1353
/* TODO: unroll this loop */
1356 1354
	asm volatile (
1357 1355
		"xor %%"REG_a", %%"REG_a"	\n\t"
1358
		ASMALIGN16
1356
		ASMALIGN(4)
1359 1357
		"1:				\n\t"
1360 1358
		PREFETCH" 32(%0, %%"REG_a")	\n\t"
1361 1359
		"movq (%0, %%"REG_a"), %%mm0	\n\t"
......
1405 1403
		"movq "MANGLE(mask24r)", %%mm5	\n\t"
1406 1404
		"movq "MANGLE(mask24g)", %%mm6	\n\t"
1407 1405
		"movq "MANGLE(mask24b)", %%mm7	\n\t"
1408
		ASMALIGN16
1406
		ASMALIGN(4)
1409 1407
		"1:				\n\t"
1410 1408
		PREFETCH" 32(%1, %%"REG_a")	\n\t"
1411 1409
		"movq   (%1, %%"REG_a"), %%mm0	\n\t" // BGR BGR BG
......
1475 1473
//FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway)
1476 1474
		asm volatile(
1477 1475
			"xor %%"REG_a", %%"REG_a"	\n\t"
1478
			ASMALIGN16
1476
			ASMALIGN(4)
1479 1477
			"1:				\n\t"
1480 1478
			PREFETCH" 32(%1, %%"REG_a", 2)	\n\t"
1481 1479
			PREFETCH" 32(%2, %%"REG_a")	\n\t"
......
1628 1626
//FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway)
1629 1627
		asm volatile(
1630 1628
			"xor %%"REG_a", %%"REG_a"	\n\t"
1631
			ASMALIGN16
1629
			ASMALIGN(4)
1632 1630
			"1:				\n\t"
1633 1631
			PREFETCH" 32(%1, %%"REG_a", 2)	\n\t"
1634 1632
			PREFETCH" 32(%2, %%"REG_a")	\n\t"
......
1752 1750
			"xor %%"REG_a", %%"REG_a"	\n\t"
1753 1751
			"pcmpeqw %%mm7, %%mm7		\n\t"
1754 1752
			"psrlw $8, %%mm7		\n\t" // FF,00,FF,00...
1755
			ASMALIGN16
1753
			ASMALIGN(4)
1756 1754
			"1:				\n\t"
1757 1755
			PREFETCH" 64(%0, %%"REG_a", 4)	\n\t"
1758 1756
			"movq (%0, %%"REG_a", 4), %%mm0	\n\t" // YUYV YUYV(0)
......
1805 1803

  
1806 1804
		asm volatile(
1807 1805
			"xor %%"REG_a", %%"REG_a"	\n\t"
1808
			ASMALIGN16
1806
			ASMALIGN(4)
1809 1807
			"1:				\n\t"
1810 1808
			PREFETCH" 64(%0, %%"REG_a", 4)	\n\t"
1811 1809
			"movq (%0, %%"REG_a", 4), %%mm0	\n\t" // YUYV YUYV(0)
......
1990 1988
			"xorl %%eax, %%eax		\n\t"
1991 1989
			"pcmpeqw %%mm7, %%mm7		\n\t"
1992 1990
			"psrlw $8, %%mm7		\n\t" // FF,00,FF,00...
1993
			ASMALIGN16
1991
			ASMALIGN(4)
1994 1992
			"1:				\n\t"
1995 1993
			PREFETCH" 64(%0, %%eax, 4)	\n\t"
1996 1994
			"movq (%0, %%eax, 4), %%mm0	\n\t" // UYVY UYVY(0)
......
2043 2041

  
2044 2042
		asm volatile(
2045 2043
			"xorl %%eax, %%eax		\n\t"
2046
			ASMALIGN16
2044
			ASMALIGN(4)
2047 2045
			"1:				\n\t"
2048 2046
			PREFETCH" 64(%0, %%eax, 4)	\n\t"
2049 2047
			"movq (%0, %%eax, 4), %%mm0	\n\t" // YUYV YUYV(0)
......
2121 2119
				"movq "MANGLE(w1111)", %%mm5		\n\t"
2122 2120
				"pxor %%mm7, %%mm7		\n\t"
2123 2121
				"lea (%%"REG_a", %%"REG_a", 2), %%"REG_b"\n\t"
2124
				ASMALIGN16
2122
				ASMALIGN(4)
2125 2123
				"1:				\n\t"
2126 2124
				PREFETCH" 64(%0, %%"REG_b")	\n\t"
2127 2125
				"movd (%0, %%"REG_b"), %%mm0	\n\t"
......
2195 2193
			"pxor %%mm7, %%mm7		\n\t"
2196 2194
			"lea (%%"REG_a", %%"REG_a", 2), %%"REG_b"\n\t"
2197 2195
			"add %%"REG_b", %%"REG_b"	\n\t"
2198
			ASMALIGN16
2196
			ASMALIGN(4)
2199 2197
			"1:				\n\t"
2200 2198
			PREFETCH" 64(%0, %%"REG_b")	\n\t"
2201 2199
			PREFETCH" 64(%1, %%"REG_b")	\n\t"

Also available in: Unified diff