changeset 6411:5d50e8a7eb09 libavcodec

Alternative and faster (on gcc x86) plane rotation.
author michael
date Tue, 26 Feb 2008 15:52:37 +0000
parents 72e573046758
children 1f70d64c00bc
files faandct.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/faandct.c	Tue Feb 26 15:44:49 2008 +0000
+++ b/faandct.c	Tue Feb 26 15:52:37 2008 +0000
@@ -107,9 +107,14 @@
         tmp5 += tmp6;
         tmp6 += tmp7;
 
+#if 0
         z5= (tmp4 - tmp6) * A5;
         z2= tmp4*A2 + z5;
         z4= tmp6*A4 + z5;
+#else
+        z2= tmp4*(A2+A5) - tmp6*A5;
+        z4= tmp6*(A4-A5) + tmp4*A5;
+#endif
         tmp5*=A1;
 
         z11= tmp7 + tmp5;
@@ -161,9 +166,14 @@
         tmp5 += tmp6;
         tmp6 += tmp7;
 
+#if 0
         z5= (tmp4 - tmp6) * A5;
         z2= tmp4*A2 + z5;
         z4= tmp6*A4 + z5;
+#else
+        z2= tmp4*(A2+A5) - tmp6*A5;
+        z4= tmp6*(A4-A5) + tmp4*A5;
+#endif
         tmp5*=A1;
 
         z11= tmp7 + tmp5;