diff libpostproc/postprocess_template.c @ 2036:6a6c678517b3 libavcodec

altivec optimizations and horizontal filter fix by (Romain Dolbeau <dolbeau at irisa dot fr>)
author michael
date Wed, 26 May 2004 20:15:15 +0000
parents 4225c131a2eb
children 98d8283534bb
line wrap: on
line diff
--- a/libpostproc/postprocess_template.c	Wed May 26 20:04:49 2004 +0000
+++ b/libpostproc/postprocess_template.c	Wed May 26 20:15:15 2004 +0000
@@ -170,6 +170,7 @@
  * Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle)
  * using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16
  */
+#ifndef HAVE_ALTIVEC
 static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c)
 {
 #if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
@@ -340,6 +341,7 @@
 	}
 #endif
 }
+#endif //HAVE_ALTIVEC
 
 #if 0
 /**
@@ -582,6 +584,7 @@
 #endif
 }
 
+#ifndef HAVE_ALTIVEC
 static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext *c)
 {
 #if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
@@ -1149,7 +1152,9 @@
 	}
 #endif
 }
-
+#endif //HAVE_ALTIVEC
+
+#ifndef HAVE_ALTIVEC
 static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c)
 {
 #if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
@@ -1505,6 +1510,7 @@
 #endif
 #endif
 }
+#endif //HAVE_ALTIVEC
 
 /**
  * Deinterlaces the given block by linearly interpolating every second line.
@@ -3134,13 +3140,12 @@
 					horizX1Filter(dstBlock-4, stride, QP);
 				else if(mode & H_DEBLOCK)
 				{
-					if( isHorizDC(dstBlock-4, stride, &c))
-					{
-						if(isHorizMinMaxOk(dstBlock-4, stride, QP))
-							doHorizLowPass(dstBlock-4, stride, QP);
-					}
-					else
-						doHorizDefFilter(dstBlock-4, stride, QP);
+					const int t= RENAME(horizClassify)(dstBlock-4, stride, &c);
+
+					if(t==1)
+						RENAME(doHorizLowPass)(dstBlock-4, stride, &c);
+					else if(t==2)
+						RENAME(doHorizDefFilter)(dstBlock-4, stride, &c);
 				}
 #endif
 				if(mode & DERING)