From d567402be6554018899290ede7608c07540ff18c Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 5 Jul 2018 23:46:05 +0200 Subject: [PATCH] Fix a sign error in the motion search. (The paper is not entirely clear on this, but I am fairly certain it is right.) --- motion_search.frag | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/motion_search.frag b/motion_search.frag index d9d1f4e..a417834 100644 --- a/motion_search.frag +++ b/motion_search.frag @@ -133,7 +133,8 @@ void main() // so we can just subtract away the mean difference here. du -= grad_sum * (warped_sum - template_sum) * (1.0 / (patch_size * patch_size)); - u += (H_inv * du) * inv_image_size; + // Do the actual update. + u -= (H_inv * du) * inv_image_size; } // Reject if we moved too far. -- 2.39.2