vp8: fix to denoiser under resize and denoiser toggling
When the resolution changes while noise sensitivity (denoiser)
is disabled, denoiser buffer reallocation is skipped. If the
denoiser is then enabled without a resolution change, the denoiser
keeps using the old/previous buffers, which results in a
heap-buffer-overflow.
Fix this by always freeing the denoiser in the function
dealloc_raw_frame_buffers() when resolution changes, and reset
the buffer pointers to NULL. This will trigger realloc at the
correct/new resolution when the denoised is re-enabled.
Unittest added.
Bug: 540945422
Change-Id: Ia3d2deeef3a40943d2f2730d4073f8687502fbb6
3 files changed