Add explicit condition check to guard av1_ml_prune_4_partition() Avoid a possible false alarm of out-of-boundary access. BUG=aomedia:3499 Change-Id: Id3d8b25c60225658802d2ddb8e08e86d83017bbc
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c index be4711a..12087aa 100644 --- a/av1/encoder/partition_search.c +++ b/av1/encoder/partition_search.c
@@ -4032,6 +4032,11 @@ return; } + BLOCK_SIZE horz_4_bs = get_partition_subsize(bsize, PARTITION_HORZ_4); + BLOCK_SIZE vert_4_bs = get_partition_subsize(bsize, PARTITION_VERT_4); + if (horz_4_bs == BLOCK_INVALID || vert_4_bs == BLOCK_INVALID) + partition4_allowed = false; + PARTITION_TYPE cur_part[NUM_PART4_TYPES] = { PARTITION_HORZ_4, PARTITION_VERT_4 }; const PartitionCfg *const part_cfg = &cpi->oxcf.part_cfg;