Fix bug when measuring quality of frame with only one component

This commit is contained in:
jfmcarreira committed 2018-04-04 22:06:40 +01:00
1 parent bcba3c7368
commit bd0e1296b4
2 files changed
+4 -1

No files matched your search

-1
View File
@@ -197,7 +197,6 @@ void QualityMeasurementSidebar::updateSidebarData()
}
for( ; component < 3; component++ )
{
quality = currFrame->getQuality( m_comboBoxMetric->currentIndex(), refFrame, component );
m_ppcLabelQualityValue[component]->setText( zeroValue );
}
return;
+4
View File
@@ -1153,6 +1153,10 @@ std::vector<ClpString> CalypFrame::supportedQualityMetricsList()
double CalypFrame::getQuality( int Metric, CalypFrame* Org, int component )
{
if( component >= getNumberChannels() )
{
return 0;
}
switch( Metric )
{
case PSNR_METRIC: