Fix bug when measuring quality of frame with only one component
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user