change to prevent computatio of log(0.0)

Change-Id: I5759f309f94a2b5c1297e6db3735c52986d3ecb2
This commit is contained in:
Yaowu Xu
2013-09-20 16:14:37 -07:00
parent fbb62c6d2b
commit db92356577

View File

@@ -909,7 +909,10 @@ extern const int vp8_bits_per_mb[2][QINDEX_RANGE];
static double bitcost( double prob )
{
return -(log( prob ) / log( 2.0 ));
if (prob > 0.000122)
return -log(prob) / log(2.0);
else
return 13.0;
}
static int64_t estimate_modemvcost(VP8_COMP *cpi,
FIRSTPASS_STATS * fpstats)