[xiph-commits] r17104 - experimental/derf/theora-ptalarbvorm/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Thu Apr 1 04:33:15 PDT 2010


Author: tterribe
Date: 2010-04-01 04:33:15 -0700 (Thu, 01 Apr 2010)
New Revision: 17104

Modified:
   experimental/derf/theora-ptalarbvorm/lib/encfrag.c
Log:
Fix DC separation in the fallback C implementation of SATD.
The initial implementation in r16852 was broken.


Modified: experimental/derf/theora-ptalarbvorm/lib/encfrag.c
===================================================================
--- experimental/derf/theora-ptalarbvorm/lib/encfrag.c	2010-03-30 08:27:25 UTC (rev 17103)
+++ experimental/derf/theora-ptalarbvorm/lib/encfrag.c	2010-04-01 11:33:15 UTC (rev 17104)
@@ -307,8 +307,8 @@
     t5+=t7;
     t7=r-t7;
     /*Hadamard stage 3:*/
-    dc+=abs(t0+t1);
-    r=abs(t0-t1);
+    r=abs(t0+t1);
+    r+=abs(t0-t1);
     r+=abs(t2+t3);
     r+=abs(t2-t3);
     r+=abs(t4+t5);
@@ -317,8 +317,9 @@
     r+=abs(t6-t7);
     sad+=r;
   }
+  dc=abs(_buf[0]+_buf[1]+_buf[2]+_buf[3]+_buf[4]+_buf[5]+_buf[6]+_buf[7]);
   *_dc=dc;
-  return sad;
+  return sad-dc;
 }
 
 unsigned oc_enc_frag_satd(const oc_enc_ctx *_enc,unsigned *_dc,



More information about the commits mailing list