Skip duplicate denoiser frame buffer allocation

Allocate the frame buffer allocation for denoiser once during the
encoder initialization. This avoids allocating frame buffer
multiple times and overwriting the buffer pointer without proper
releasing.

Change-Id: I9b3baa6283449d86fd164534d344c036bb035700
This commit is contained in:
Jingning Han
2015-01-03 12:00:46 -08:00
parent 5b860e1251
commit 27582e573b
3 changed files with 24 additions and 11 deletions

View File

@@ -458,12 +458,14 @@ int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height,
make_grayscale(&denoiser->running_avg_y[i]);
#endif
denoiser->increase_denoising = 0;
denoiser->frame_buffer_initialized = 1;
return 0;
}
void vp9_denoiser_free(VP9_DENOISER *denoiser) {
int i;
denoiser->frame_buffer_initialized = 0;
if (denoiser == NULL) {
return;
}