summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2014-08-06 11:14:51 -0700
committerMarco Paniconi <marpan@google.com>2014-08-06 14:57:52 -0700
commit8450b41d4bde88da54b9d29ab096f3ce8ae6791b (patch)
treee2f9e60612d4c60f3be97cead7b9aee8eda4e67c
parent0fa4777b1c82ef8b2d6d3f023180e870f7c69835 (diff)
downloadlibvpx-8450b41d4bde88da54b9d29ab096f3ce8ae6791b.tar
libvpx-8450b41d4bde88da54b9d29ab096f3ce8ae6791b.tar.gz
libvpx-8450b41d4bde88da54b9d29ab096f3ce8ae6791b.tar.bz2
libvpx-8450b41d4bde88da54b9d29ab096f3ce8ae6791b.zip
vp8 bugfix: Reallocate denoiser when spatially resizing.
This is needed to update the width/height and stride parameters for the reference buffers that the denoiser uses. Change-Id: Id51b3bdcb56bbbc8187865544ccd3d872a0d51fe
-rw-r--r--vp8/encoder/onyx_if.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 298f50f65..91b9138bf 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2762,6 +2762,19 @@ static int resize_key_frame(VP8_COMP *cpi)
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;
}
}