ref: e5fcf05dfd494b070e51d0bad4bad81965c0b583
parent: 7ec06cddc6026feaf09a699a8da45267ef7668dd
parent: 8450b41d4bde88da54b9d29ab096f3ce8ae6791b
author: Marco Paniconi <marpan@google.com>
date: Wed Aug 6 12:09:21 EDT 2014
Merge "vp8 bugfix: Reallocate denoiser when spatially resizing."
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2762,6 +2762,19 @@
cm->Height = new_height;
vp8_alloc_compressor_data(cpi);
scale_and_extend_source(cpi->un_scaled_source, cpi);
+#if CONFIG_TEMPORAL_DENOISING
+ // TODO(marpan): denoiser_allocate() is not called in
+ // vp8_alloc_compressor_data() (currently denoiser_allocate is
+ // only called in change_config()). Check if we can move this call
+ // of denoiser_free/allocate into vp8_alloc_compressor_data().
+ if (cpi->oxcf.noise_sensitivity > 0) {
+ vp8_denoiser_free(&cpi->denoiser);
+ vp8_denoiser_allocate(&cpi->denoiser, new_width, new_height,
+ cm->mb_rows, cm->mb_cols,
+ ((cpi->oxcf.noise_sensitivity == 3) ?
+ 1 : 0));
+ }
+#endif
return 1;
}
}
--
⑨