summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tiny_psnr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index 572dd27558..be129fa2d5 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -120,6 +120,7 @@ int main(int argc,char* argv[]){
}
}
+ if(!i) i=1;
dev= int_sqrt((sse*F*F)/i);
if(sse)
psnr= (log16(256*256*255*255LL*i/sse)*284619LL*F + (1<<31)) / (1LL<<32);