VP9 denoiser bug-fix: artifact caused by false buffer swap.
The artifact occurs periodically when VP9 denoiser is on and refresh_golden_frame happen. When refresh_golden_frame happen, we should copy the frame buffer instead of swapping the pointers. Change-Id: Ib3204c4b04db28ecf439c6d9e61f3d146f04196d
This commit is contained in:
parent
f3a73f1277
commit
7231c62c9f
@ -387,7 +387,22 @@ void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For non key frames */
|
// If more than one refresh occurs, must copy frame buffer.
|
||||||
|
if ((refresh_alt_ref_frame + refresh_golden_frame + refresh_last_frame)
|
||||||
|
> 1) {
|
||||||
|
if (refresh_alt_ref_frame) {
|
||||||
|
copy_frame(denoiser->running_avg_y[ALTREF_FRAME],
|
||||||
|
denoiser->running_avg_y[INTRA_FRAME]);
|
||||||
|
}
|
||||||
|
if (refresh_golden_frame) {
|
||||||
|
copy_frame(denoiser->running_avg_y[GOLDEN_FRAME],
|
||||||
|
denoiser->running_avg_y[INTRA_FRAME]);
|
||||||
|
}
|
||||||
|
if (refresh_last_frame) {
|
||||||
|
copy_frame(denoiser->running_avg_y[LAST_FRAME],
|
||||||
|
denoiser->running_avg_y[INTRA_FRAME]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (refresh_alt_ref_frame) {
|
if (refresh_alt_ref_frame) {
|
||||||
swap_frame_buffer(&denoiser->running_avg_y[ALTREF_FRAME],
|
swap_frame_buffer(&denoiser->running_avg_y[ALTREF_FRAME],
|
||||||
&denoiser->running_avg_y[INTRA_FRAME]);
|
&denoiser->running_avg_y[INTRA_FRAME]);
|
||||||
@ -401,6 +416,7 @@ void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
|
|||||||
&denoiser->running_avg_y[INTRA_FRAME]);
|
&denoiser->running_avg_y[INTRA_FRAME]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void vp9_denoiser_reset_frame_stats(PICK_MODE_CONTEXT *ctx) {
|
void vp9_denoiser_reset_frame_stats(PICK_MODE_CONTEXT *ctx) {
|
||||||
ctx->zeromv_sse = UINT_MAX;
|
ctx->zeromv_sse = UINT_MAX;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user