ref: 61b112b67b73c86a5617f1c6b8e33f3fe0d5be1b
parent: a3d23877f6a99cecd5a849d8b915b5dfc16cd34a
author: James Zern <jzern@google.com>
date: Wed Feb 17 09:55:50 EST 2016
vp8/onyx_if: add missing alloc checks Change-Id: I9b0aa340518f45e16fa9754afd87347aabf968d7
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1318,9 +1318,11 @@
#if CONFIG_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0) {
vp8_denoiser_free(&cpi->denoiser);
- vp8_denoiser_allocate(&cpi->denoiser, width, height,
- cm->mb_rows, cm->mb_cols,
- cpi->oxcf.noise_sensitivity);
+ if (vp8_denoiser_allocate(&cpi->denoiser, width, height,
+ cm->mb_rows, cm->mb_cols,
+ cpi->oxcf.noise_sensitivity))
+ vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
+ "Failed to allocate denoiser");
}
#endif
}
@@ -1832,9 +1834,11 @@
{
int width = (cpi->oxcf.Width + 15) & ~15;
int height = (cpi->oxcf.Height + 15) & ~15;
- vp8_denoiser_allocate(&cpi->denoiser, width, height,
- cm->mb_rows, cm->mb_cols,
- cpi->oxcf.noise_sensitivity);
+ if (vp8_denoiser_allocate(&cpi->denoiser, width, height,
+ cm->mb_rows, cm->mb_cols,
+ cpi->oxcf.noise_sensitivity))
+ vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
+ "Failed to allocate denoiser");
}
}
#endif
--
⑨