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

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Jul 17 19:32:55 PDT 2008


Author: xiphmont
Date: 2008-07-17 19:32:54 -0700 (Thu, 17 Jul 2008)
New Revision: 15119

Modified:
   branches/theora-thusnelda/lib/enc/dct_encode.c
Log:
Minor chroma-counting bugfix (affects bit estimation, not correctness)


Modified: branches/theora-thusnelda/lib/enc/dct_encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_encode.c	2008-07-17 22:29:36 UTC (rev 15118)
+++ branches/theora-thusnelda/lib/enc/dct_encode.c	2008-07-18 02:32:54 UTC (rev 15119)
@@ -408,8 +408,10 @@
   
   /* if there was an EOB run pending, count the cost of flushing it */
   if(cpi->eob_run[coeff]){
+    int rchroma = !(cpi->eob_run[coeff]&0x8000); 
+    int rhuff = cpi->huffchoice[cpi->FrameType!=KEY_FRAME][1][rchroma];
     make_eobrun_token(cpi->eob_run[coeff],&token,&eb);
-    cost += tokencost(cpi,huff,coeff,token);
+    cost += tokencost(cpi,rhuff,coeff,token);
   }
 
   /* count cost of token */



More information about the commits mailing list