Commit 3e110598 authored by jbr's avatar jbr

fix a rounding error in the PSNR calculation and update the many regression

test references that this change affects.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20492 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 74abbaf3
This diff is collapsed.
...@@ -155,7 +155,7 @@ int main(int argc,char* argv[]){ ...@@ -155,7 +155,7 @@ int main(int argc,char* argv[]){
if(!i) i=1; if(!i) i=1;
dev= int_sqrt( ((sse/i)*F*F) + (((sse%i)*F*F) + i/2)/i ); dev= int_sqrt( ((sse/i)*F*F) + (((sse%i)*F*F) + i/2)/i );
if(sse) 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 else
psnr= 1000*F-1; //floating point free infinity :) psnr= 1000*F-1; //floating point free infinity :)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment