summaryrefslogtreecommitdiff
path: root/vpx_dsp
diff options
context:
space:
mode:
Diffstat (limited to 'vpx_dsp')
-rw-r--r--vpx_dsp/psnrhvs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpx_dsp/psnrhvs.c b/vpx_dsp/psnrhvs.c
index 095ba5d13..3708cc3c8 100644
--- a/vpx_dsp/psnrhvs.c
+++ b/vpx_dsp/psnrhvs.c
@@ -245,6 +245,8 @@ static double calc_psnrhvs(const unsigned char *src, int _systride,
}
}
}
+ if (pixels <=0)
+ return 0;
ret /= pixels;
return ret;
}