vp9: Fix some issues with denoiser and SVC.

Fix the update of the denoiser buffer when the base
spatial layer is a key frame. And allow for better/lower
QP on high spatial layers when their base layer is key frame.

Change-Id: I96b2426f1eaa43b8b8d4c31a68b0c6d68c3024a2
This commit is contained in:
Marco
2017-03-15 16:51:34 -07:00
parent 8440cc4817
commit a340c64a79
5 changed files with 34 additions and 16 deletions

View File

@@ -413,15 +413,15 @@ static void swap_frame_buffer(YV12_BUFFER_CONFIG *const dest,
src->y_buffer = tmp_buf;
}
void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
YV12_BUFFER_CONFIG src,
FRAME_TYPE frame_type,
int refresh_alt_ref_frame,
int refresh_golden_frame,
int refresh_last_frame, int resized) {
void vp9_denoiser_update_frame_info(
VP9_DENOISER *denoiser, YV12_BUFFER_CONFIG src, FRAME_TYPE frame_type,
int refresh_alt_ref_frame, int refresh_golden_frame, int refresh_last_frame,
int resized, int svc_base_is_key) {
// Copy source into denoised reference buffers on KEY_FRAME or
// if the just encoded frame was resized.
if (frame_type == KEY_FRAME || resized != 0 || denoiser->reset) {
// if the just encoded frame was resized. For SVC, copy source if the base
// spatial layer was key frame.
if (frame_type == KEY_FRAME || resized != 0 || denoiser->reset ||
svc_base_is_key) {
int i;
// Start at 1 so as not to overwrite the INTRA_FRAME
for (i = 1; i < MAX_REF_FRAMES; ++i)