Commit c0923d4d authored by Marco's avatar Marco

Fix to vp9 denoiser.

Prevent from using wrong mv for denoiser motion compensation.

Change-Id: Ifa0f9daabdbdab0900d3c17304059fe0d15de914
parent eb12d880
......@@ -403,10 +403,7 @@ void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
void vp9_denoiser_reset_frame_stats(PICK_MODE_CONTEXT *ctx) {
ctx->zeromv_sse = UINT_MAX;
// This should be initialized as zero since mode search stage might skip
// NEWMV mode if inferred motion vector modes provide sufficiently good
// prediction quality.
ctx->newmv_sse = 0;
ctx->newmv_sse = UINT_MAX;
}
void vp9_denoiser_update_frame_stats(MB_MODE_INFO *mbmi, unsigned int sse,
......@@ -418,7 +415,7 @@ void vp9_denoiser_update_frame_stats(MB_MODE_INFO *mbmi, unsigned int sse,
ctx->best_zeromv_reference_frame = mbmi->ref_frame[0];
}
if (mode == NEWMV) {
if (mbmi->mv[0].as_int != 0 && sse < ctx->newmv_sse) {
ctx->newmv_sse = sse;
ctx->best_sse_inter_mode = mode;
ctx->best_sse_mv = mbmi->mv[0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment