Fix PSNR formula
This commit is contained in:
1 parent
2aaeb9f6ed
commit
6d2f5eacdb
1 file changed
+3
-1
@@ -1327,10 +1327,12 @@ Double PlaYUVerFrame::getMSE( PlaYUVerFrame* Org, Int component )
|
||||
|
||||
Double PlaYUVerFrame::getPSNR( PlaYUVerFrame* Org, Int component )
|
||||
{
|
||||
UInt uiMaxValue = ( 1 << Org->getBitsPel() );
|
||||
Double uiMaxValueSquare = uiMaxValue * uiMaxValue;
|
||||
Double dPSNR = 100;
|
||||
Double dMSE = getMSE( Org, component );
|
||||
if( dMSE != 0 )
|
||||
dPSNR = 10 * log10( 65025 / dMSE );
|
||||
dPSNR = 10 * log10( uiMaxValueSquare / dMSE );
|
||||
return dPSNR;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user