[xiph-commits] r16307 - branches/theora-thusnelda/lib/enc
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Tue Jul 21 04:16:15 PDT 2009
Author: xiphmont
Date: 2009-07-21 04:16:14 -0700 (Tue, 21 Jul 2009)
New Revision: 16307
Modified:
branches/theora-thusnelda/lib/enc/analyze.c
Log:
Correct an overflow in RD cost match when lambda is near maximum.
Temorary fix as AQ will replace this code.
Modified: branches/theora-thusnelda/lib/enc/analyze.c
===================================================================
--- branches/theora-thusnelda/lib/enc/analyze.c 2009-07-21 00:24:32 UTC (rev 16306)
+++ branches/theora-thusnelda/lib/enc/analyze.c 2009-07-21 11:16:14 UTC (rev 16307)
@@ -943,7 +943,8 @@
}
static void oc_mode_set_cost(oc_mode_choice *_modec,int _lambda){
- _modec->cost=_modec->ssd+(_modec->rate+_modec->overhead)*_lambda;
+ _modec->cost=(_modec->ssd>>OC_BIT_SCALE)+
+ ((_modec->rate+_modec->overhead)>>OC_BIT_SCALE)*_lambda;
}
static void oc_cost_intra(oc_enc_ctx *_enc,oc_mode_choice *_modec,
More information about the commits
mailing list