projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbb62c6
)
change to prevent computatio of log(0.0)
author
Yaowu Xu
<yaowu@google.com>
Fri, 20 Sep 2013 23:14:37 +0000
(16:14 -0700)
committer
Yaowu Xu
<yaowu@google.com>
Tue, 24 Sep 2013 00:19:12 +0000
(17:19 -0700)
Change-Id: I5759f309f94a2b5c1297e6db3735c52986d3ecb2
vp8/encoder/firstpass.c
patch
|
blob
|
history
diff --git
a/vp8/encoder/firstpass.c
b/vp8/encoder/firstpass.c
index
8548e74
..
968c7f3
100644
(file)
--- a/
vp8/encoder/firstpass.c
+++ b/
vp8/encoder/firstpass.c
@@
-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)