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

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue Nov 11 21:27:23 PST 2008


Author: xiphmont
Date: 2008-11-11 21:27:21 -0800 (Tue, 11 Nov 2008)
New Revision: 15519

Modified:
   branches/theora-thusnelda/lib/enc/dct_encode.c
   branches/theora-thusnelda/lib/enc/mode.c
Log:
Commit two minor catches in metrics bit counting



Modified: branches/theora-thusnelda/lib/enc/dct_encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_encode.c	2008-11-10 22:10:00 UTC (rev 15518)
+++ branches/theora-thusnelda/lib/enc/dct_encode.c	2008-11-12 05:27:21 UTC (rev 15519)
@@ -428,10 +428,11 @@
   cost += tokencost(cpi,huff, coeff, token);
   
   /* if token was a zero run, we've not yet coded up to the value */
-  if( (token==DCT_SHORT_ZRL_TOKEN) || (token==DCT_ZRL_TOKEN))
-    return cost + tokenize_dctcost(cpi,chroma,coeff2,coeff2,val);
-  else
-    return cost;
+  if( (token==DCT_SHORT_ZRL_TOKEN) || (token==DCT_ZRL_TOKEN)){
+    token = make_dct_token(cpi,coeff2,coeff2,val,&eb);
+    cost += tokencost(cpi,huff, coeff, token);
+  }
+  return cost;
 }
 
 /* The opportunity cost of an in-progress EOB run is the cost to flush

Modified: branches/theora-thusnelda/lib/enc/mode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/mode.c	2008-11-10 22:10:00 UTC (rev 15518)
+++ branches/theora-thusnelda/lib/enc/mode.c	2008-11-12 05:27:21 UTC (rev 15519)
@@ -1345,7 +1345,7 @@
   for(;gi<=AC_TABLE_4_THRESH;gi++)
     ModeMetricsGroup(cpi, gi, huff[2]+AC_HUFF_CHOICES*2, huff[3]+AC_HUFF_CHOICES*2, eobcounts, actual_bits);
   for(;gi<BLOCK_SIZE;gi++)
-    ModeMetricsGroup(cpi, gi, huff[2]+AC_HUFF_CHOICES*3, huff[2]+AC_HUFF_CHOICES*3, eobcounts, actual_bits);
+    ModeMetricsGroup(cpi, gi, huff[2]+AC_HUFF_CHOICES*3, huff[3]+AC_HUFF_CHOICES*3, eobcounts, actual_bits);
 
   /* accumulate */
   for(fi=0;fi<v;fi++)



More information about the commits mailing list