Opened 7 years ago

Closed 7 years ago

#51 closed defect (fixed)

Possible bug during ERP to RVP conversion in PSNR computation

Reported by: lenchik Owned by:
Priority: minor Milestone:
Component: 360Lib Version:
Keywords: Cc: vzakharc, yuwenhe, jvet@…

Description

The current 360Lib code (360Lib-3.0rc1) with HM-16.15 while converting from ERP to RVP, we observe PSNR is not calculated properly may be due to not setting the bit depths as SPSNR_NN is disabled for RVP. We think the following might be a bug.

Old code: At line 2119 in source\App\utils\TApp360Convert\TApp360ConvertCfg.cpp

#if SVIDEO_SPSNR_NN

cSPSNRCalc.setSPSNREnabledFlag(m_psnrEnabled[METRIC_SPSNR_NN]);
if(m_psnrEnabled[METRIC_SPSNR_NN])
{

cPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);
cSPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cSPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);

}

#endif

Suggested new code:
#if SVIDEO_SPSNR_NN

if (m_psnrEnabled[METRIC_PSNR])
{

cPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);

}

cSPSNRCalc.setSPSNREnabledFlag(m_psnrEnabled[METRIC_SPSNR_NN]);
if(m_psnrEnabled[METRIC_SPSNR_NN])
{

cSPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cSPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);

}

#endif

Change history (2)

comment:1 Changed 7 years ago by yuwenhe

The bug report is correct. Suggest move the bitdepth setting for PSNR metric outside of "SVIDEO_SPSNR_NN" macro. The changes are included in /branches/360Lib-3.1-dev.

if (m_psnrEnabled[METRIC_PSNR])
{

cPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);

}

#if SVIDEO_SPSNR_NN
cSPSNRCalc.setSPSNREnabledFlag(m_psnrEnabled[METRIC_SPSNR_NN]);
if(m_psnrEnabled[METRIC_SPSNR_NN])
{

cSPSNRCalc.setOutputBitDepth(m_outputBitDepth);
cSPSNRCalc.setReferenceBitDepth(m_referenceBitDepth);

}
#endif

comment:2 Changed 7 years ago by yuwenhe

  • Resolution set to fixed
  • Status changed from new to closed

The fix for ticket 51 was checked in /branches/360Lib-3.1-dev

Note: See TracTickets for help on using tickets.