Revision 4bff9ef9 libswscale/swscale_template.c

View differences:

libswscale/swscale_template.c
16 16
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 17
*/
18 18

  
19
#include "asmalign.h"
20

  
21 19
#undef REAL_MOVNTQ
22 20
#undef MOVNTQ
23 21
#undef PAVGB
......
74 72
			"movq %%mm3, %%mm4		\n\t"\
75 73
			"lea " offset "(%0), %%"REG_d"	\n\t"\
76 74
			"mov (%%"REG_d"), %%"REG_S"	\n\t"\
77
			ASMALIGN16 /* FIXME Unroll? */\
75
			ASMALIGN(4) /* FIXME Unroll? */\
78 76
			"1:				\n\t"\
79 77
			"movq 8(%%"REG_d"), %%mm0	\n\t" /* filterCoeff */\
80 78
			"movq " #x "(%%"REG_S", %%"REG_a", 2), %%mm2\n\t" /* srcData */\
......
112 110
                        "pxor %%mm6, %%mm6              \n\t"\
113 111
                        "pxor %%mm7, %%mm7              \n\t"\
114 112
			"mov (%%"REG_d"), %%"REG_S"	\n\t"\
115
			ASMALIGN16 \
113
			ASMALIGN(4) \
116 114
			"1:				\n\t"\
117 115
			"movq " #x "(%%"REG_S", %%"REG_a", 2), %%mm0\n\t" /* srcData */\
118 116
			"movq 8+" #x "(%%"REG_S", %%"REG_a", 2), %%mm2\n\t" /* srcData */\
......
167 165

  
168 166
#define YSCALEYUV2YV121 \
169 167
			"mov %2, %%"REG_a"		\n\t"\
170
			ASMALIGN16 /* FIXME Unroll? */\
168
			ASMALIGN(4) /* FIXME Unroll? */\
171 169
			"1:				\n\t"\
172 170
			"movq (%0, %%"REG_a", 2), %%mm0	\n\t"\
173 171
			"movq 8(%0, %%"REG_a", 2), %%mm1\n\t"\
......
188 186
#define YSCALEYUV2PACKEDX \
189 187
	asm volatile(\
190 188
		"xor %%"REG_a", %%"REG_a"	\n\t"\
191
		ASMALIGN16\
189
		ASMALIGN(4)\
192 190
		"nop				\n\t"\
193 191
		"1:				\n\t"\
194 192
		"lea "CHR_MMX_FILTER_OFFSET"(%0), %%"REG_d"\n\t"\
195 193
		"mov (%%"REG_d"), %%"REG_S"	\n\t"\
196 194
		"movq "VROUNDER_OFFSET"(%0), %%mm3\n\t"\
197 195
		"movq %%mm3, %%mm4		\n\t"\
198
		ASMALIGN16\
196
		ASMALIGN(4)\
199 197
		"2:				\n\t"\
200 198
		"movq 8(%%"REG_d"), %%mm0	\n\t" /* filterCoeff */\
201 199
		"movq (%%"REG_S", %%"REG_a"), %%mm2	\n\t" /* UsrcData */\
......
213 211
		"mov (%%"REG_d"), %%"REG_S"	\n\t"\
214 212
		"movq "VROUNDER_OFFSET"(%0), %%mm1\n\t"\
215 213
		"movq %%mm1, %%mm7		\n\t"\
216
		ASMALIGN16\
214
		ASMALIGN(4)\
217 215
		"2:				\n\t"\
218 216
		"movq 8(%%"REG_d"), %%mm0	\n\t" /* filterCoeff */\
219 217
		"movq (%%"REG_S", %%"REG_a", 2), %%mm2	\n\t" /* Y1srcData */\
......
237 235
#define YSCALEYUV2PACKEDX_ACCURATE \
238 236
	asm volatile(\
239 237
		"xor %%"REG_a", %%"REG_a"	\n\t"\
240
		ASMALIGN16\
238
		ASMALIGN(4)\
241 239
		"nop				\n\t"\
242 240
		"1:				\n\t"\
243 241
		"lea "CHR_MMX_FILTER_OFFSET"(%0), %%"REG_d"\n\t"\
......
246 244
                "pxor %%mm5, %%mm5              \n\t"\
247 245
                "pxor %%mm6, %%mm6              \n\t"\
248 246
                "pxor %%mm7, %%mm7              \n\t"\
249
		ASMALIGN16\
247
		ASMALIGN(4)\
250 248
		"2:				\n\t"\
251 249
		"movq (%%"REG_S", %%"REG_a"), %%mm0	\n\t" /* UsrcData */\
252 250
		"movq 4096(%%"REG_S", %%"REG_a"), %%mm2	\n\t" /* VsrcData */\
......
290 288
                "pxor %%mm5, %%mm5              \n\t"\
291 289
                "pxor %%mm7, %%mm7              \n\t"\
292 290
                "pxor %%mm6, %%mm6              \n\t"\
293
		ASMALIGN16\
291
		ASMALIGN(4)\
294 292
		"2:				\n\t"\
295 293
		"movq (%%"REG_S", %%"REG_a", 2), %%mm0	\n\t" /* Y1srcData */\
296 294
		"movq 8(%%"REG_S", %%"REG_a", 2), %%mm2	\n\t" /* Y2srcData */\
......
374 372
		"punpcklwd %%mm5, %%mm5		\n\t"\
375 373
		"punpcklwd %%mm5, %%mm5		\n\t"\
376 374
		"xor %%"REG_a", %%"REG_a"		\n\t"\
377
		ASMALIGN16\
375
		ASMALIGN(4)\
378 376
		"1:				\n\t"\
379 377
		"movq (%0, %%"REG_a", 2), %%mm0	\n\t" /*buf0[eax]*/\
380 378
		"movq (%1, %%"REG_a", 2), %%mm1	\n\t" /*buf1[eax]*/\
......
427 425
		"movq %%mm0, "CHR_MMX_FILTER_OFFSET"+8("#c")\n\t"\
428 426
		"movq %%mm1, "LUM_MMX_FILTER_OFFSET"+8("#c")\n\t"\
429 427
		"xor "#index", "#index"		\n\t"\
430
		ASMALIGN16\
428
		ASMALIGN(4)\
431 429
		"1:				\n\t"\
432 430
		"movq (%2, "#index"), %%mm2	\n\t" /* uvbuf0[eax]*/\
433 431
		"movq (%3, "#index"), %%mm3	\n\t" /* uvbuf1[eax]*/\
......
459 457
                
460 458
#define REAL_YSCALEYUV2RGB(index, c) \
461 459
		"xor "#index", "#index"	\n\t"\
462
		ASMALIGN16\
460
		ASMALIGN(4)\
463 461
		"1:				\n\t"\
464 462
		"movq (%2, "#index"), %%mm2	\n\t" /* uvbuf0[eax]*/\
465 463
		"movq (%3, "#index"), %%mm3	\n\t" /* uvbuf1[eax]*/\
......
525 523
                
526 524
#define REAL_YSCALEYUV2PACKED1(index, c) \
527 525
		"xor "#index", "#index"		\n\t"\
528
		ASMALIGN16\
526
		ASMALIGN(4)\
529 527
		"1:				\n\t"\
530 528
		"movq (%2, "#index"), %%mm3	\n\t" /* uvbuf0[eax]*/\
531 529
		"movq 4096(%2, "#index"), %%mm4	\n\t" /* uvbuf0[eax+2048]*/\
......
540 538
                
541 539
#define REAL_YSCALEYUV2RGB1(index, c) \
542 540
		"xor "#index", "#index"	\n\t"\
543
		ASMALIGN16\
541
		ASMALIGN(4)\
544 542
		"1:				\n\t"\
545 543
		"movq (%2, "#index"), %%mm3	\n\t" /* uvbuf0[eax]*/\
546 544
		"movq 4096(%2, "#index"), %%mm4	\n\t" /* uvbuf0[eax+2048]*/\
......
589 587

  
590 588
#define REAL_YSCALEYUV2PACKED1b(index, c) \
591 589
		"xor "#index", "#index"		\n\t"\
592
		ASMALIGN16\
590
		ASMALIGN(4)\
593 591
		"1:				\n\t"\
594 592
		"movq (%2, "#index"), %%mm2	\n\t" /* uvbuf0[eax]*/\
595 593
		"movq (%3, "#index"), %%mm3	\n\t" /* uvbuf1[eax]*/\
......
608 606
// do vertical chrominance interpolation
609 607
#define REAL_YSCALEYUV2RGB1b(index, c) \
610 608
		"xor "#index", "#index"		\n\t"\
611
		ASMALIGN16\
609
		ASMALIGN(4)\
612 610
		"1:				\n\t"\
613 611
		"movq (%2, "#index"), %%mm2	\n\t" /* uvbuf0[eax]*/\
614 612
		"movq (%3, "#index"), %%mm3	\n\t" /* uvbuf1[eax]*/\
......
1868 1866
		"movq "MANGLE(w1111)", %%mm5		\n\t"
1869 1867
		"pxor %%mm7, %%mm7		\n\t"
1870 1868
		"lea (%%"REG_a", %%"REG_a", 2), %%"REG_b"\n\t"
1871
		ASMALIGN16
1869
		ASMALIGN(4)
1872 1870
		"1:				\n\t"
1873 1871
		PREFETCH" 64(%0, %%"REG_b")	\n\t"
1874 1872
		"movd (%0, %%"REG_b"), %%mm0	\n\t"
......
1954 1952
		"pxor %%mm7, %%mm7		\n\t"
1955 1953
		"lea (%%"REG_a", %%"REG_a", 2), %%"REG_b"	\n\t"
1956 1954
		"add %%"REG_b", %%"REG_b"	\n\t"
1957
		ASMALIGN16
1955
		ASMALIGN(4)
1958 1956
		"1:				\n\t"
1959 1957
		PREFETCH" 64(%0, %%"REG_b")	\n\t"
1960 1958
		PREFETCH" 64(%1, %%"REG_b")	\n\t"
......
2261 2259
			"movq "MANGLE(w02)", %%mm6	\n\t"
2262 2260
			"push %%"REG_BP"		\n\t" // we use 7 regs here ...
2263 2261
			"mov %%"REG_a", %%"REG_BP"	\n\t"
2264
			ASMALIGN16
2262
			ASMALIGN(4)
2265 2263
			"1:				\n\t"
2266 2264
			"movzwl (%2, %%"REG_BP"), %%eax	\n\t"
2267 2265
			"movzwl 2(%2, %%"REG_BP"), %%ebx\n\t"
......
2299 2297
			"movq "MANGLE(w02)", %%mm6	\n\t"
2300 2298
			"push %%"REG_BP"		\n\t" // we use 7 regs here ...
2301 2299
			"mov %%"REG_a", %%"REG_BP"	\n\t"
2302
			ASMALIGN16
2300
			ASMALIGN(4)
2303 2301
			"1:				\n\t"
2304 2302
			"movzwl (%2, %%"REG_BP"), %%eax	\n\t"
2305 2303
			"movzwl 2(%2, %%"REG_BP"), %%ebx\n\t"
......
2348 2346
		asm volatile(
2349 2347
			"pxor %%mm7, %%mm7		\n\t"
2350 2348
			"movq "MANGLE(w02)", %%mm6	\n\t"
2351
			ASMALIGN16
2349
			ASMALIGN(4)
2352 2350
			"1:				\n\t"
2353 2351
			"mov %2, %%"REG_c"		\n\t"
2354 2352
			"movzwl (%%"REG_c", %0), %%eax	\n\t"
......
2532 2530
		"xor %%"REG_a", %%"REG_a"	\n\t" // i
2533 2531
		"xor %%"REG_b", %%"REG_b"	\n\t" // xx
2534 2532
		"xorl %%ecx, %%ecx		\n\t" // 2*xalpha
2535
		ASMALIGN16
2533
		ASMALIGN(4)
2536 2534
		"1:				\n\t"
2537 2535
		"movzbl  (%0, %%"REG_b"), %%edi	\n\t" //src[xx]
2538 2536
		"movzbl 1(%0, %%"REG_b"), %%esi	\n\t" //src[xx+1]
......
2729 2727
		"xor %%"REG_a", %%"REG_a"	\n\t" // i
2730 2728
		"xor %%"REG_b", %%"REG_b"		\n\t" // xx
2731 2729
		"xorl %%ecx, %%ecx		\n\t" // 2*xalpha
2732
		ASMALIGN16
2730
		ASMALIGN(4)
2733 2731
		"1:				\n\t"
2734 2732
		"mov %0, %%"REG_S"		\n\t"
2735 2733
		"movzbl  (%%"REG_S", %%"REG_b"), %%edi	\n\t" //src[xx]

Also available in: Unified diff