From b00803e0ae39cb785acd6128adb367bb4a8b7a0d Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 9 Nov 2009 23:09:47 +0000 Subject: fix a rounding error in the PSNR calculation and update the many regression test references that this change affects. Originally committed as revision 20492 to svn://svn.ffmpeg.org/ffmpeg/trunk --- tests/tiny_psnr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/tiny_psnr.c') diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c index 6327e6f9e4..f8d1b7bfa5 100644 --- a/tests/tiny_psnr.c +++ b/tests/tiny_psnr.c @@ -155,7 +155,7 @@ int main(int argc,char* argv[]){ if(!i) i=1; dev= int_sqrt( ((sse/i)*F*F) + (((sse%i)*F*F) + i/2)/i ); if(sse) - psnr= ((2*log16(max<<16) + log16(i) - log16(sse))*284619LL*F + (1<<31)) / (1LL<<32); + psnr= ((2*log16(max<<16) + log16(i) - log16(sse))*284619LL*F + (1LL<<31)) / (1LL<<32); else psnr= 1000*F-1; //floating point free infinity :) -- cgit v1.2.3