Commit b00803e0 authored by Justin Ruggles's avatar Justin Ruggles

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
parent a7b9c8ae
This diff is collapsed.
......@@ -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 :)
......
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