summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-01-06 16:17:05 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-01-07 08:50:13 -0800
commitce08006951641ddc3af6ef75737bb96d2ce7cbcf (patch)
treef4097ce27d445cd295d8e457d73e7a53831f49a2 /vp9
parent27582e573b0f6fcee45dd860d67fe6ffa6ba86ba (diff)
downloadlibvpx-ce08006951641ddc3af6ef75737bb96d2ce7cbcf.tar
libvpx-ce08006951641ddc3af6ef75737bb96d2ce7cbcf.tar.gz
libvpx-ce08006951641ddc3af6ef75737bb96d2ce7cbcf.tar.bz2
libvpx-ce08006951641ddc3af6ef75737bb96d2ce7cbcf.zip
Always check and free denoiser buffer memory space
The vp9_denoiser_free() function will internally check if the buffer pointers are NULL. This commit makes the encoder always call vp9_denoiser_free() after finishing encoding. It protects the case where noise_sensitivity_level is changed during encoding process and happen to be turned off towards the end of sequence, which could result memory space allocated to denoiser not being released. Change-Id: Ie20dc2f2e6e5fb6333fbab3356bc153978a6a0f8
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encoder.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 628660b5f..230df1ffa 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -1780,9 +1780,7 @@ void vp9_remove_compressor(VP9_COMP *cpi) {
}
#if CONFIG_VP9_TEMPORAL_DENOISING
- if (cpi->oxcf.noise_sensitivity > 0) {
- vp9_denoiser_free(&(cpi->denoiser));
- }
+ vp9_denoiser_free(&(cpi->denoiser));
#endif
for (t = 0; t < cpi->num_workers; ++t) {