summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2012-10-15 18:41:32 -0700
committerMarco Paniconi <marpan@google.com>2012-10-16 13:37:38 -0700
commit4cf4c94ad1668dd140e2185497192d92c35d98ea (patch)
treeefad0eb1caa06d3a766d913f4ce0ce815b24b2c9 /vp8/encoder
parent9da8a344373bd2503a1274fd0e096b6c8d4d0f47 (diff)
downloadlibvpx-4cf4c94ad1668dd140e2185497192d92c35d98ea.tar
libvpx-4cf4c94ad1668dd140e2185497192d92c35d98ea.tar.gz
libvpx-4cf4c94ad1668dd140e2185497192d92c35d98ea.tar.bz2
libvpx-4cf4c94ad1668dd140e2185497192d92c35d98ea.zip
Fix to rd cost computation for mv bias.
This prevents the rd cost from wrapping around and going negative. Change-Id: Id61390537d2ad47762e410918bb4e18f6a0912d4
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/pickinter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c
index 8ca77b971..c4fa691a4 100644
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -513,7 +513,8 @@ static int evaluate_inter_mode(unsigned int* sse, int rate2, int* distortion2,
&& x->e_mbd.mode_info_context->mbmi.ref_frame != LAST_FRAME)
rd_adj = 100;
- this_rd = this_rd * rd_adj/100;
+ // rd_adj <= 100
+ this_rd = ((int64_t)this_rd) * rd_adj / 100;
}
check_for_encode_breakout(*sse, x);