[xiph-commits] r15550 - branches/theora-thusnelda/lib/enc

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Dec 1 23:36:06 PST 2008


Author: xiphmont
Date: 2008-12-01 23:36:05 -0800 (Mon, 01 Dec 2008)
New Revision: 15550

Modified:
   branches/theora-thusnelda/lib/enc/codec_internal.h
   branches/theora-thusnelda/lib/enc/dct_encode.c
Log:
Move to consistent lambda scaling



Modified: branches/theora-thusnelda/lib/enc/codec_internal.h
===================================================================
--- branches/theora-thusnelda/lib/enc/codec_internal.h	2008-12-02 07:34:41 UTC (rev 15549)
+++ branches/theora-thusnelda/lib/enc/codec_internal.h	2008-12-02 07:36:05 UTC (rev 15550)
@@ -22,7 +22,7 @@
 # include "config.h"
 #endif
 
-#undef COLLECT_METRICS 
+//#define COLLECT_METRICS 
 
 #include "theora/theora.h"
 #include "encoder_huffman.h"
@@ -246,7 +246,6 @@
 
   oc_mode_scheme_chooser chooser;
 
-
   /*********************************************************************/
   /* Token Buffers */
   int             *fr_partial;
@@ -278,6 +277,7 @@
   long             rho_count[65]; 
 
 #ifdef COLLECT_METRICS
+  long             rho_postop; 
   int             *frag_mbi;
   int             *frag_sad;
   int             *dct_token_frag_storage;
@@ -285,6 +285,8 @@
   int             *dct_eob_fi_storage;
   int             *dct_eob_fi_stack[64];
   int              dct_eob_fi_count[64];
+  ogg_int64_t     dist_dist[3][8];
+  ogg_int64_t     dist_bits[3][8];
 #endif
 
   /********************************************************************/

Modified: branches/theora-thusnelda/lib/enc/dct_encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_encode.c	2008-12-02 07:34:41 UTC (rev 15549)
+++ branches/theora-thusnelda/lib/enc/dct_encode.c	2008-12-02 07:36:05 UTC (rev 15550)
@@ -506,7 +506,7 @@
 	int dd = dval*dequant[i] - origdct[ii];
 	int delta = dd*dd - od*od;
 
-	if(delta < ((cost*cpi->token_lambda)<<4)){
+	if(delta < cost*cpi->token_lambda){
 	  /* we have a winner.  Demote token */
 	  dct[i]=dval;
 



More information about the commits mailing list