Remove aom_realloc()
It only handles the realloc constraint (preserving low elements) by
serendipity, and we don't actually rely on that behavior anyway.
Meanwhile the calls may do extra copying that gets immediately clobbered
by the callers.
Cherry-pick from libvpx:
3063c3760 Remove vpx_realloc()
Change-Id: I8dfa89e4a81084b084889c27bd272fdf85184e8d
diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c
index d82bb3a..09f6135 100644
--- a/av1/common/alloccommon.c
+++ b/av1/common/alloccommon.c
@@ -95,9 +95,9 @@
av1_alloc_restoration_struct(
cm, &cm->rst_info[p], ROUND_POWER_OF_TWO(cm->width, cm->subsampling_x),
ROUND_POWER_OF_TWO(cm->height, cm->subsampling_y));
- CHECK_MEM_ERROR(
- cm, cm->rst_internal.tmpbuf,
- (int32_t *)aom_realloc(cm->rst_internal.tmpbuf, RESTORATION_TMPBUF_SIZE));
+ aom_free(cm->rst_internal.tmpbuf);
+ CHECK_MEM_ERROR(cm, cm->rst_internal.tmpbuf,
+ (int32_t *)aom_malloc(RESTORATION_TMPBUF_SIZE));
}
void av1_free_restoration_buffers(AV1_COMMON *cm) {