shithub: libvpx

Download patch

ref: 2ceaf10e07dd07a242c532259b310948ce3321df
parent: e3178d0c1c21534f933cb8196b79e420c5760d1a
author: Alex Converse <[email protected]>
date: Tue Feb 18 10:56:07 EST 2014

Do not use the value of 'rate_mv' if uninitialized.

This happens when exiting single_motion_search() early due to adaptive_motion_search.

Change-Id: Ic396e7e31e59ff219bb66a459c873c9e5b17400d

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2708,6 +2708,8 @@
       int_mv tmp_mv;
       single_motion_search(cpi, x, tile, bsize, mi_row, mi_col,
                            &tmp_mv, &rate_mv);
+      if (tmp_mv.as_int == INVALID_MV)
+        return INT64_MAX;
       *rate2 += rate_mv;
       frame_mv[refs[0]].as_int =
           xd->mi_8x8[0]->bmi[0].as_mv[0].as_int = tmp_mv.as_int;