From: Jingning Han Date: Wed, 5 Mar 2014 02:46:40 +0000 (-0800) Subject: Fix use of uninitialized bsize in non-RD mode X-Git-Tag: v1.4.0~2103^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29af074fb5b633c0483ca7aa38155cd656f68e8b;p=libvpx 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 --- diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 57d2c78ab..91011202d 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: