ref: db9235657741ce3fa5b9226f55d780304320ef8c
parent: fbb62c6d2bd1951cb1a69bdba13c582d2939f93e
author: Yaowu Xu <[email protected]>
date: Fri Sep 20 12:14:37 EDT 2013
change to prevent computatio of log(0.0) Change-Id: I5759f309f94a2b5c1297e6db3735c52986d3ecb2
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -909,7 +909,10 @@
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)