From 29af074fb5b633c0483ca7aa38155cd656f68e8b Mon Sep 17 00:00:00 2001
From: Jingning Han <jingning@google.com>
Date: Tue, 4 Mar 2014 18:46:40 -0800
Subject: [PATCH] Fix use of uninitialized bsize in non-RD mode

The block size used for non-RD mode decision in FIXED_PARTITION
setting was uninitialized. This commit fixes it by setting block
size to be BLOCK_16X16.

Change-Id: Ief04c9f1ab668de69297d9ab3dc15e2fa0bc4e95
---
 vp9/encoder/vp9_onyx_if.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 57d2c78ab9..91011202df 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -707,7 +707,6 @@ static void set_good_speed_feature(VP9_COMMON *cm,
   if (speed >= 5) {
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
     sf->partition_search_type = FIXED_PARTITION;
-    sf->always_this_block_size = BLOCK_16X16;
     sf->tx_size_search_method = frame_is_intra_only(cm) ?
       USE_FULL_RD : USE_LARGESTALL;
     sf->mode_search_skip_flags = FLAG_SKIP_INTRA_DIRMISMATCH |
@@ -943,6 +942,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
   for (i = 0; i < BLOCK_SIZES; ++i)
     sf->disable_inter_mode_mask[i] = 0;
   sf->max_intra_bsize = BLOCK_64X64;
+  // This setting only takes effect when partition_search_type is set
+  // to FIXED_PARTITION.
+  sf->always_this_block_size = BLOCK_16X16;
 
   switch (cpi->oxcf.mode) {
     case MODE_BESTQUALITY:
-- 
GitLab