[xiph-commits] r15520 - branches/theora-thusnelda/lib/enc
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Tue Nov 11 21:37:32 PST 2008
Author: xiphmont
Date: 2008-11-11 21:37:32 -0800 (Tue, 11 Nov 2008)
New Revision: 15520
Modified:
branches/theora-thusnelda/lib/enc/dct_encode.c
Log:
revert one, catch another
Modified: branches/theora-thusnelda/lib/enc/dct_encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_encode.c 2008-11-12 05:27:21 UTC (rev 15519)
+++ branches/theora-thusnelda/lib/enc/dct_encode.c 2008-11-12 05:37:32 UTC (rev 15520)
@@ -419,7 +419,7 @@
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);
+ make_eobrun_token(cpi->eob_run[coeff]&0x7fff,&token,&eb);
cost += tokencost(cpi,rhuff,coeff,token);
}
@@ -428,11 +428,10 @@
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)){
- token = make_dct_token(cpi,coeff2,coeff2,val,&eb);
- cost += tokencost(cpi,huff, coeff, token);
- }
- return cost;
+ if( (token==DCT_SHORT_ZRL_TOKEN) || (token==DCT_ZRL_TOKEN))
+ return cost + tokenize_dctcost(cpi,chroma,coeff2,coeff2,val);
+ else
+ return cost;
}
/* The opportunity cost of an in-progress EOB run is the cost to flush
More information about the commits
mailing list