| Index: source/libvpx/vp9/encoder/vp9_denoiser.c
|
| diff --git a/source/libvpx/vp9/encoder/vp9_denoiser.c b/source/libvpx/vp9/encoder/vp9_denoiser.c
|
| index 4f245e2499cd414a5344d92ffb80d4612e2e55ed..7d4e26aaf2f72acab9b790fd517b2cdf64e7b0e3 100644
|
| --- a/source/libvpx/vp9/encoder/vp9_denoiser.c
|
| +++ b/source/libvpx/vp9/encoder/vp9_denoiser.c
|
| @@ -403,7 +403,10 @@ void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
|
|
|
| void vp9_denoiser_reset_frame_stats(PICK_MODE_CONTEXT *ctx) {
|
| ctx->zeromv_sse = UINT_MAX;
|
| - ctx->newmv_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;
|
| }
|
|
|
| void vp9_denoiser_update_frame_stats(MB_MODE_INFO *mbmi, unsigned int sse,
|
| @@ -415,7 +418,7 @@ void vp9_denoiser_update_frame_stats(MB_MODE_INFO *mbmi, unsigned int sse,
|
| ctx->best_zeromv_reference_frame = mbmi->ref_frame[0];
|
| }
|
|
|
| - if (mbmi->mv[0].as_int != 0 && sse < ctx->newmv_sse) {
|
| + if (mode == NEWMV) {
|
| ctx->newmv_sse = sse;
|
| ctx->best_sse_inter_mode = mode;
|
| ctx->best_sse_mv = mbmi->mv[0];
|
|
|