diff libpostproc/postprocess_template.c @ 2043:703b80c99891 libavcodec

Another (final?) patch for libpostproc. This one replace horizClassify by a transpose/(use Vert)/transpose sequence. This add LowPass and DefFilter for "free". I also fixed the header in postprocess.c and special-cased some of the well-aligned cases (all horiz stuff is well-aligned). patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
author michael
date Sun, 30 May 2004 01:53:43 +0000
parents b996fbe0a7e7
children 185f3b18ec1f
line wrap: on
line diff
--- a/libpostproc/postprocess_template.c	Sat May 29 15:16:52 2004 +0000
+++ b/libpostproc/postprocess_template.c	Sun May 30 01:53:43 2004 +0000
@@ -3684,12 +3684,27 @@
 					horizX1Filter(dstBlock-4, stride, QP);
 				else if(mode & H_DEBLOCK)
 				{
+#ifdef HAVE_ALTIVEC
+					unsigned char __attribute__ ((aligned(16))) tempBlock[272];
+					transpose_16x8_char_toPackedAlign_altivec(tempBlock, dstBlock - (4 + 1), stride);
+
+					const int t=vertClassify_altivec(tempBlock-48, 16, &c);
+					if(t==1) {
+						doVertLowPass_altivec(tempBlock-48, 16, &c);
+                                                transpose_8x16_char_fromPackedAlign_altivec(dstBlock - (4 + 1), tempBlock, stride);
+                                        }
+					else if(t==2) {
+						doVertDefFilter_altivec(tempBlock-48, 16, &c);
+                                                transpose_8x16_char_fromPackedAlign_altivec(dstBlock - (4 + 1), tempBlock, stride);
+                                        }
+#else
 					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
 				}else if(mode & H_A_DEBLOCK){
 					RENAME(do_a_deblock)(dstBlock-8, 1, stride, &c);
 				}