Revision 64c968da libavcodec/libpostproc/postprocess_template.c

View differences:

libavcodec/libpostproc/postprocess_template.c
186 186
            return 2;
187 187
        }
188 188
}
189
#endif
189
#endif //HAVE_MMX
190 190

  
191 191
/**
192 192
 * Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle)
......
322 322
		: "r" (src), "r" ((long)stride), "m" (c->pQPb)
323 323
		: "%"REG_a, "%"REG_c
324 324
	);
325
#else
325
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
326 326
	const int l1= stride;
327 327
	const int l2= stride + l1;
328 328
	const int l3= stride + l2;
......
362 362

  
363 363
		src++;
364 364
	}
365
#endif
365
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
366 366
}
367 367
#endif //HAVE_ALTIVEC
368 368

  
......
442 442
		: "r" (src), "r" ((long)stride)
443 443
		: "%"REG_a, "%"REG_c
444 444
	);
445
#else
445
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
446 446
 	const int l1= stride;
447 447
	const int l2= stride + l1;
448 448
	const int l3= stride + l2;
......
468 468
		}
469 469
	}
470 470

  
471
#endif
471
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
472 472
}
473
#endif
473
#endif //0
474 474

  
475 475
/**
476 476
 * Experimental Filter 1
......
567 567
		: "r" (src), "r" ((long)stride), "m" (co->pQPb)
568 568
		: "%"REG_a, "%"REG_c
569 569
	);
570
#else
570
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
571 571

  
572 572
 	const int l1= stride;
573 573
	const int l2= stride + l1;
......
604 604
		}
605 605
		src++;
606 606
	}
607
#endif
607
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
608 608
}
609 609

  
610 610
#ifndef HAVE_ALTIVEC
......
733 733
		"pxor %%mm6, %%mm2				\n\t"
734 734
		"movq %%mm0, (%%"REG_a", %1, 2)			\n\t"
735 735
		"movq %%mm2, (%0, %1, 4)			\n\t"
736
#endif
736
#endif //0
737 737

  
738 738
		"lea (%0, %1), %%"REG_a"			\n\t"
739 739
		"pcmpeqb %%mm6, %%mm6				\n\t" // -1
......
1132 1132
		: "r" ((long)stride), "m" (c->pQPb)
1133 1133
		: "%"REG_a, "%"REG_c
1134 1134
	);
1135
#else
1135
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1136 1136
	const int l1= stride;
1137 1137
	const int l2= stride + l1;
1138 1138
	const int l3= stride + l2;
......
1175 1175
		}
1176 1176
		src++;
1177 1177
	}
1178
#endif
1178
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1179 1179
}
1180 1180
#endif //HAVE_ALTIVEC
1181 1181

  
......
1406 1406
		: : "r" (src), "r" ((long)stride), "m" (c->pQPb), "m"(c->pQPb2)
1407 1407
		: "%"REG_a, "%"REG_d, "%"REG_c
1408 1408
	);
1409
#else
1409
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1410 1410
	int y;
1411 1411
	int min=255;
1412 1412
	int max=0;
......
1536 1536
//		src[0] = src[7]=src[stride*7]=src[stride*7 + 7]=255;
1537 1537
	}
1538 1538
#endif
1539
#endif
1539
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1540 1540
}
1541 1541
#endif //HAVE_ALTIVEC
1542 1542

  
......
1643 1643
		: : "r" (src), "r" ((long)stride)
1644 1644
		: "%"REG_a, "%"REG_d, "%"REG_c
1645 1645
	);
1646
#else
1646
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1647 1647
	int x;
1648 1648
	src+= stride*3;
1649 1649
	for(x=0; x<8; x++)
......
1654 1654
		src[stride*9] = CLIP((-src[stride*6] + 9*src[stride*8] + 9*src[stride*10] - src[stride*12])>>4);
1655 1655
		src++;
1656 1656
	}
1657
#endif
1657
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1658 1658
}
1659 1659

  
1660 1660
/**
......
1715 1715
		: : "r" (src), "r" ((long)stride), "r"(tmp)
1716 1716
		: "%"REG_a, "%"REG_d
1717 1717
	);
1718
#else
1718
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1719 1719
	int x;
1720 1720
	src+= stride*4;
1721 1721
	for(x=0; x<8; x++)
......
1734 1734

  
1735 1735
		src++;
1736 1736
	}
1737
#endif
1737
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1738 1738
}
1739 1739

  
1740 1740
/**
......
1806 1806
		: : "r" (src), "r" ((long)stride), "r"(tmp), "r"(tmp2)
1807 1807
		: "%"REG_a, "%"REG_d
1808 1808
	);
1809
#else
1809
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1810 1810
	int x;
1811 1811
	src+= stride*4;
1812 1812
	for(x=0; x<8; x++)
......
1836 1836

  
1837 1837
		src++;
1838 1838
	}
1839
#endif
1839
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1840 1840
}
1841 1841

  
1842 1842
/**
......
1895 1895
		: : "r" (src), "r" ((long)stride), "r" (tmp)
1896 1896
		: "%"REG_a, "%"REG_d
1897 1897
	);
1898
#else
1898
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1899 1899
	int a, b, c, x;
1900 1900
	src+= 4*stride;
1901 1901

  
......
1938 1938
		src += 4;
1939 1939
		tmp += 4;
1940 1940
	}
1941
#endif
1941
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
1942 1942
}
1943 1943

  
1944 1944
/**
......
2041 2041
		: : "r" (src), "r" ((long)stride)
2042 2042
		: "%"REG_a, "%"REG_d
2043 2043
	);
2044
#endif // MMX
2045
#else
2044
#endif //HAVE_MMX2
2045
#else //HAVE_MMX
2046 2046
	int x, y;
2047 2047
	src+= 4*stride;
2048 2048
	// FIXME - there should be a way to do a few columns in parallel like w/mmx
......
2063 2063
		}
2064 2064
		src++;
2065 2065
	}
2066
#endif
2066
#endif //HAVE_MMX
2067 2067
}
2068 2068

  
2069 2069
#ifdef HAVE_MMX
......
2231 2231
	: "%"REG_a, "%"REG_d
2232 2232
	);
2233 2233
}
2234
#endif
2234
#endif //HAVE_MMX
2235 2235
//static long test=0;
2236 2236

  
2237 2237
#ifndef HAVE_ALTIVEC
......
2278 2278
		"paddw %%mm5, %%mm6				\n\t"
2279 2279
		"paddw %%mm7, %%mm6				\n\t"
2280 2280
		"paddw %%mm6, %%mm0				\n\t"
2281
#else
2281
#else //L1_DIFF
2282 2282
#if defined (FAST_L2_DIFF)
2283 2283
		"pcmpeqb %%mm7, %%mm7				\n\t"
2284 2284
		"movq "MANGLE(b80)", %%mm6			\n\t"
......
2297 2297
		"psrld $14, %%mm5				\n\t"\
2298 2298
		"paddd %%mm5, %%mm0				\n\t"
2299 2299

  
2300
#else
2300
#else //defined (FAST_L2_DIFF)
2301 2301
		"pxor %%mm7, %%mm7				\n\t"
2302 2302
		"pxor %%mm0, %%mm0				\n\t"
2303 2303
#define REAL_L2_DIFF_CORE(a, b)\
......
2316 2316
		"paddd %%mm1, %%mm5				\n\t"\
2317 2317
		"paddd %%mm5, %%mm0				\n\t"
2318 2318

  
2319
#endif
2319
#endif //defined (FAST_L2_DIFF)
2320 2320

  
2321 2321
#define L2_DIFF_CORE(a, b)  REAL_L2_DIFF_CORE(a, b)
2322 2322

  
......
2329 2329
L2_DIFF_CORE((%0, %%REGa,2), (%1, %%REGa,2))
2330 2330
L2_DIFF_CORE((%0, %%REGc), (%1, %%REGc))
2331 2331

  
2332
#endif
2332
#endif //L1_DIFF
2333 2333

  
2334 2334
		"movq %%mm0, %%mm4				\n\t"
2335 2335
		"psrlq $32, %%mm0				\n\t"
......
2534 2534
		: "%"REG_a, "%"REG_d, "%"REG_c, "memory"
2535 2535
		);
2536 2536
//printf("%d\n", test);
2537
#else
2537
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
2538 2538
{
2539 2539
	int y;
2540 2540
	int d=0;
......
2637 2637
		}
2638 2638
	}
2639 2639
}
2640
#endif
2640
#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
2641 2641
}
2642 2642
#endif //HAVE_ALTIVEC
2643 2643

  
......
3253 3253
						"movq %%mm0, " #dst1 "	\n\t"\
3254 3254
						"movq %%mm1, " #dst2 "	\n\t"\
3255 3255

  
3256
#endif //!HAVE_MMX2
3256
#endif //HAVE_MMX2
3257 3257
#define SCALED_CPY(src1, src2, dst1, dst2)\
3258 3258
   REAL_SCALED_CPY(src1, src2, dst1, dst2)
3259 3259

  
......
3273 3273
						"r" ((long)dstStride)
3274 3274
						: "%"REG_d
3275 3275
					);
3276
#else
3276
#else //HAVE_MMX
3277 3277
				for(i=0; i<8; i++)
3278 3278
					memcpy(	&(dst[dstStride*i]),
3279 3279
						&(src[srcStride*i]), BLOCK_SIZE);
3280
#endif
3280
#endif //HAVE_MMX
3281 3281
	}
3282 3282
	else
3283 3283
	{
......
3308 3308
						"r" ((long)dstStride)
3309 3309
						: "%"REG_a, "%"REG_d
3310 3310
					);
3311
#else
3311
#else //HAVE_MMX
3312 3312
				for(i=0; i<8; i++)
3313 3313
					memcpy(	&(dst[dstStride*i]),
3314 3314
						&(src[srcStride*i]), BLOCK_SIZE);
3315
#endif
3315
#endif //HAVE_MMX
3316 3316
	}
3317 3317
}
3318 3318

  
......
3744 3744
				}else if(mode & H_A_DEBLOCK){
3745 3745
					RENAME(do_a_deblock)(dstBlock-8, 1, stride, &c);
3746 3746
				}
3747
#endif
3747
#endif //HAVE_MMX
3748 3748
				if(mode & DERING)
3749 3749
				{
3750 3750
				//FIXME filter first line

Also available in: Unified diff