summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_mcomp.c
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2015-02-03 12:58:34 -0800
committerJohann <johannkoenig@google.com>2015-02-03 13:03:46 -0800
commitba186095029953985616b41e67db1a1c96c1c11c (patch)
treef2e60faa3d7c4ff009fea448bbf27d42fb0c86a1 /vp9/encoder/vp9_mcomp.c
parent51945a54003f5dcc7642467ad0718f701d526764 (diff)
downloadlibvpx-ba186095029953985616b41e67db1a1c96c1c11c.tar
libvpx-ba186095029953985616b41e67db1a1c96c1c11c.tar.gz
libvpx-ba186095029953985616b41e67db1a1c96c1c11c.tar.bz2
libvpx-ba186095029953985616b41e67db1a1c96c1c11c.zip
Remove unnecessary pointer check
The original implementation had the following comment: // Ignore mv costing if mvsadcost is NULL However the current implementation does not allow for this. If x exists then nmvsadcost must not be null. This removes the only warning from -Wpointer-bool-conversion https://code.google.com/p/webm/issues/detail?id=894 Change-Id: I1a2cee340d7972d41e1bbbe1ec8dfbe917667085
Diffstat (limited to 'vp9/encoder/vp9_mcomp.c')
-rw-r--r--vp9/encoder/vp9_mcomp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c
index a428f1a2d..159e0fc0c 100644
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -90,13 +90,10 @@ static int mv_err_cost(const MV *mv, const MV *ref,
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) {