Simplify cm->tpl_mvs check in ensure_mv_buffer()
Simplify the check in ensure_mv_buffer() to determine if cm->tpl_mvs
should be reallocated.
Change-Id: If4c6c69b28b43c182239a7374efffa76d010ec54
diff --git a/av1/common/av1_common_int.h b/av1/common/av1_common_int.h
index f3f2823..b4f5783 100644
--- a/av1/common/av1_common_int.h
+++ b/av1/common/av1_common_int.h
@@ -1237,10 +1237,8 @@
const int mem_size =
((mi_params->mi_rows + MAX_MIB_SIZE) >> 1) * (mi_params->mi_stride >> 1);
- int realloc = cm->tpl_mvs == NULL;
- if (cm->tpl_mvs) realloc |= cm->tpl_mvs_mem_size < mem_size;
- if (realloc) {
+ if (cm->tpl_mvs == NULL || cm->tpl_mvs_mem_size < mem_size) {
aom_free(cm->tpl_mvs);
CHECK_MEM_ERROR(cm, cm->tpl_mvs,
(TPL_MV_REF *)aom_calloc(mem_size, sizeof(*cm->tpl_mvs)));