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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user