shithub: libvpx

Download patch

ref: 3a5d40608ef5603764f45ec33448f5c013b875b4
parent: cb411108a3830fb02c8f8a988b7f3b0e66d076c9
parent: ba186095029953985616b41e67db1a1c96c1c11c
author: Johann <johannkoenig@google.com>
date: Tue Feb 3 12:12:56 EST 2015

Merge "Remove unnecessary pointer check"

--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -90,13 +90,10 @@
 
 static int mvsad_err_cost(const MACROBLOCK *x, const MV *mv, const MV *ref,
                           int error_per_bit) {
-  if (x->nmvsadcost) {
-    const MV diff = { mv->row - ref->row,
-                      mv->col - ref->col };
-    return ROUND_POWER_OF_TWO(mv_cost(&diff, x->nmvjointsadcost,
-                                      x->nmvsadcost) * error_per_bit, 8);
-  }
-  return 0;
+  const MV diff = { mv->row - ref->row,
+                    mv->col - ref->col };
+  return ROUND_POWER_OF_TWO(mv_cost(&diff, x->nmvjointsadcost,
+                                    x->nmvsadcost) * error_per_bit, 8);
 }
 
 void vp9_init_dsmotion_compensation(search_site_config *cfg, int stride) {