summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2015-06-30 19:48:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-06-30 19:48:33 +0000
commite943db045a5ca86389c3a41a1b7b7b0e16e71986 (patch)
tree92d4fe97991251df0b4411de8bb6adcf9b085c9e /vp9/encoder
parentfc3c456053d5523997d878ea696526a5faa95523 (diff)
parent9f14bbfd801550ce96144c039f69d0c86081c58f (diff)
downloadlibvpx-e943db045a5ca86389c3a41a1b7b7b0e16e71986.tar
libvpx-e943db045a5ca86389c3a41a1b7b7b0e16e71986.tar.gz
libvpx-e943db045a5ca86389c3a41a1b7b7b0e16e71986.tar.bz2
libvpx-e943db045a5ca86389c3a41a1b7b7b0e16e71986.zip
Merge "Fixed a variance calculation"
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_firstpass.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 3d7843ea7..16640fed9 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1031,8 +1031,10 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
fps.mvr_abs = (double)sum_mvr_abs / mvcount;
fps.MVc = (double)sum_mvc / mvcount;
fps.mvc_abs = (double)sum_mvc_abs / mvcount;
- fps.MVrv = ((double)sum_mvrs - (fps.MVr * fps.MVr / mvcount)) / mvcount;
- fps.MVcv = ((double)sum_mvcs - (fps.MVc * fps.MVc / mvcount)) / mvcount;
+ fps.MVrv = ((double)sum_mvrs -
+ ((double)sum_mvr * sum_mvr / mvcount)) / mvcount;
+ fps.MVcv = ((double)sum_mvcs -
+ ((double)sum_mvc * sum_mvc / mvcount)) / mvcount;
fps.mv_in_out_count = (double)sum_in_vectors / (mvcount * 2);
fps.new_mv_count = new_mv_count;
fps.pcnt_motion = (double)mvcount / num_mbs;