shithub: libvpx

Download patch

ref: dbc963a42fa4b3544a0188867561050511d3ad33
parent: 8c4360ed89127a0946f36dfe6a2919a72922f2bd
author: Marco <[email protected]>
date: Thu Jan 21 10:13:10 EST 2016

vp9 pickmode: Fix the shift on negative value.

Error only affected svc 1 pass mode, introduced in:
https://chromium-review.googlesource.com/#/c/319609/

Change-Id: Ifc078c82d38b742966a81baaf5ad532f7dbc13a4

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -117,8 +117,8 @@
     MV_REF *candidate =
         &cm->prev_frame->mvs[(mi_col>>1) + (mi_row>>1) * (cm->mi_cols>>1)];
     if (candidate->mv[0].as_int != INVALID_MV) {
-        base_mv->as_mv.row = (candidate->mv[0].as_mv.row << 1);
-        base_mv->as_mv.col = (candidate->mv[0].as_mv.col << 1);
+        base_mv->as_mv.row = (candidate->mv[0].as_mv.row * 2);
+        base_mv->as_mv.col = (candidate->mv[0].as_mv.col * 2);
       clamp_mv_ref(&base_mv->as_mv, xd);
     } else {
       base_mv->as_int = INVALID_MV;