shithub: libvpx

Download patch

ref: eeae6f946dd99b961308fb5f30877061aa7b2caf
parent: c73e4412b30ada9689a8e8ef161f4b6e24521a38
author: Yaowu Xu <yaowu@google.com>
date: Mon Sep 16 08:44:50 EDT 2013

fix a problem where an invalid mv used in search

The commit added reset of pred_mv at the beginning of each SB64x64
partition mv search, also limited the usage of pred_mv only when
search on the largest partition is already done. This is to fix
a crash at speed 1/2 encoder where an invalid mv is used in mv
search.

Change-Id: I39010177da76d054e3c90b7899a44feb2e3a5b1b

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2051,6 +2051,8 @@
     int dummy_rate;
     int64_t dummy_dist;
 
+    vpx_memset(cpi->mb.pred_mv, 0, sizeof(cpi->mb.pred_mv));
+
     if (cpi->sf.reference_masking)
       rd_pick_reference_frame(cpi, mi_row, mi_col);
 
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2096,7 +2096,8 @@
   int row_offset, col_offset;
   int num_mv_refs = MAX_MV_REF_CANDIDATES +
                     (cpi->sf.adaptive_motion_search &&
-                     cpi->common.show_frame && block_size < BLOCK_64X64);
+                     cpi->common.show_frame &&
+                     block_size < cpi->sf.max_partition_size);
 
   // Get the sad for each candidate reference mv
   for (i = 0; i < num_mv_refs; i++) {
--