aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tiny_psnr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-20 15:40:50 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-20 15:40:50 +0000
commiteeaa742c3e77077628f9d4e87b5faf24f2b7e183 (patch)
treece5376533ee88cd70cf24b122410dc2fdb9440f3 /tests/tiny_psnr.c
parent9ebb8e11248f85cb9a93aca6e2f91696f0621a89 (diff)
downloadffmpeg-eeaa742c3e77077628f9d4e87b5faf24f2b7e183.tar.gz
1/0 fix for files with size=0
Originally committed as revision 3484 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tests/tiny_psnr.c')
-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);