summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_denoiser.c
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2015-01-28 10:24:25 -0800
committerMarco <marpan@google.com>2015-01-28 12:07:27 -0800
commitc0923d4d3aa61cb0a4ad7a4143ef3f06e15b4f2a (patch)
tree4b196b6796fa9c35eb20984b482502460d9788dc /vp9/encoder/vp9_denoiser.c
parenteb12d880ab3b25a3839a7aa03ba0b24aea3023f1 (diff)
downloadlibvpx-c0923d4d3aa61cb0a4ad7a4143ef3f06e15b4f2a.tar
libvpx-c0923d4d3aa61cb0a4ad7a4143ef3f06e15b4f2a.tar.gz
libvpx-c0923d4d3aa61cb0a4ad7a4143ef3f06e15b4f2a.tar.bz2
libvpx-c0923d4d3aa61cb0a4ad7a4143ef3f06e15b4f2a.zip
Fix to vp9 denoiser.
Prevent from using wrong mv for denoiser motion compensation. Change-Id: Ifa0f9daabdbdab0900d3c17304059fe0d15de914
Diffstat (limited to 'vp9/encoder/vp9_denoiser.c')
-rw-r--r--vp9/encoder/vp9_denoiser.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c
index 7d4e26aaf..4f245e249 100644
--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -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];