Commit aabc334f authored by Karl Sharman's avatar Karl Sharman
Browse files

remove macro JCTVC_Y0037_XPSNR

parent 1677e87e
......@@ -810,12 +810,10 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("PrintFrameMSE", m_printFrameMSE, false, "0 (default) emit only bit count and PSNRs for each frame, 1 = also emit MSE values")
("PrintSequenceMSE", m_printSequenceMSE, false, "0 (default) emit only bit rate and PSNRs for the whole sequence, 1 = also emit MSE values")
("PrintMSSSIM", m_printMSSSIM, false, "0 (default) do not print MS-SSIM scores, 1 = print MS-SSIM scores for each frame and for the whole sequence")
#if JCTVC_Y0037_XPSNR
("xPSNREnableFlag,-xPS", m_bXPSNREnableFlag, false, "Cross-Component xPSNR computation")
("xPSNRYWeight,-xPS0", m_dXPSNRWeight[COMPONENT_Y], ( Double )1.0, "xPSNR weighting factor for Y (default: 1.0)")
("xPSNRCbWeight,-xPS1", m_dXPSNRWeight[COMPONENT_Cb], ( Double )1.0, "xPSNR weighting factor for Cb (default: 1.0)")
("xPSNRCrWeight,-xPS2", m_dXPSNRWeight[COMPONENT_Cr], ( Double )1.0, "xPSNR weighting factor for Cr (default: 1.0)")
#endif
("CabacZeroWordPaddingEnabled", m_cabacZeroWordPaddingEnabled, true, "0 do not add conforming cabac-zero-words to bit streams, 1 (default) = add cabac-zero-words as required")
("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)")
("ConformanceMode", m_conformanceWindowMode, 0, "Deprecated alias of ConformanceWindowMode")
......@@ -3136,13 +3134,11 @@ Void TAppEncCfg::xPrintParameter()
printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
printf("Frame MSE output : %s\n", (m_printFrameMSE ? "Enabled" : "Disabled") );
printf("MS-SSIM output : %s\n", (m_printMSSSIM ? "Enabled" : "Disabled") );
#if JCTVC_Y0037_XPSNR
printf("xPSNR calculation : %s\n", (m_bXPSNREnableFlag ? "Enabled" : "Disabled"));
if (m_bXPSNREnableFlag)
{
printf("xPSNR Weights : (%8.3f, %8.3f, %8.3f)\n", m_dXPSNRWeight[COMPONENT_Y], m_dXPSNRWeight[COMPONENT_Cb], m_dXPSNRWeight[COMPONENT_Cr]);
}
#endif
printf("Cabac-zero-word-padding : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") );
if (m_isField)
{
......
......@@ -115,10 +115,8 @@ protected:
Bool m_printSequenceMSE;
Bool m_printMSSSIM;
#if JCTVC_Y0037_XPSNR
Bool m_bXPSNREnableFlag; ///< xPSNR enable flag
Double m_dXPSNRWeight[MAX_NUM_COMPONENT]; ///< xPSNR per component weights
#endif
Bool m_cabacZeroWordPaddingEnabled;
Bool m_bClipInputVideoToRec709Range;
......
......@@ -106,13 +106,11 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop.setPrintSequenceMSE ( m_printSequenceMSE);
m_cTEncTop.setPrintMSSSIM ( m_printMSSSIM );
#if JCTVC_Y0037_XPSNR
m_cTEncTop.setXPSNREnableFlag ( m_bXPSNREnableFlag);
for (Int id = 0 ; id < MAX_NUM_COMPONENT; id++)
{
m_cTEncTop.setXPSNRWeight ( m_dXPSNRWeight[id], ComponentID(id));
}
#endif
m_cTEncTop.setCabacZeroWordPaddingEnabled ( m_cabacZeroWordPaddingEnabled );
......
......@@ -91,7 +91,6 @@
// To use this capability enable config parameter LambdaFromQpEnable
#define JCTVC_Y0037_XPSNR 1 ///< Enable xPSNR (Cross-Component PSNR) computation
#ifndef EXTENSION_360_VIDEO
#define EXTENSION_360_VIDEO 0 ///< extension for 360/spherical video coding support; this macro should be controlled by makefile, as it would be used to control whether the library is built and linked
......
......@@ -69,18 +69,14 @@ public:
Bool printSequenceMSE;
Bool printFrameMSE;
Bool printMSSSIM;
#if JCTVC_Y0037_XPSNR
Bool printXPSNR;
#endif
Bool printHexPerPOCPSNRs;
};
struct ResultData
{
ResultData () : bits(0)
#if JCTVC_Y0037_XPSNR
, xpsnr(0)
#endif
{
for(Int i=0; i<MAX_NUM_COMPONENT; i++)
{
......@@ -93,9 +89,7 @@ public:
Double bits;
Double MSEyuvframe[MAX_NUM_COMPONENT];
Double MSSSIM[MAX_NUM_COMPONENT];
#if JCTVC_Y0037_XPSNR
Double xpsnr;
#endif
};
private:
......@@ -121,17 +115,13 @@ public:
m_runningTotal.MSSSIM[i] += result.MSSSIM[i];
}
#if JCTVC_Y0037_XPSNR
m_runningTotal.xpsnr += result.xpsnr;
#endif
m_uiNumPic++;
}
Double getPsnr(ComponentID compID) const { return m_runningTotal.psnr[compID]; }
Double getMsssim(ComponentID compID) const { return m_runningTotal.MSSSIM[compID]; }
#if JCTVC_Y0037_XPSNR
Double getxPSNR() const { return m_runningTotal.xpsnr;}
#endif
Double getBits() const { return m_runningTotal.bits; }
Void setBits(Double numBits) { m_runningTotal.bits=numBits; }
UInt getNumPic() const { return m_uiNumPic; }
......@@ -227,12 +217,10 @@ public:
printf( " Y-MS-SSIM ");
}
#if JCTVC_Y0037_XPSNR
if (logctrl.printXPSNR)
{
printf( " xPSNR ");
}
#endif
if (logctrl.printSequenceMSE)
{
......@@ -258,13 +246,11 @@ public:
{
printf(" %8.6lf ", getMsssim(COMPONENT_Y) / (Double)getNumPic());
}
#if JCTVC_Y0037_XPSNR
if(logctrl.printXPSNR)
{
printf(" %8.4lf ",
getxPSNR() / (Double)getNumPic());
}
#endif
if (logctrl.printSequenceMSE)
{
......@@ -304,12 +290,10 @@ public:
{
printf(" Y-MS-SSIM " "U-MS-SSIM " "V-MS-SSIM ");
}
#if JCTVC_Y0037_XPSNR
if (logctrl.printXPSNR)
{
printf( " xPSNR ");
}
#endif
#if EXTENSION_360_VIDEO
m_ext360.printHeader();
......@@ -344,13 +328,11 @@ public:
getMsssim(COMPONENT_Cr) / (Double)getNumPic());
}
#if JCTVC_Y0037_XPSNR
if(logctrl.printXPSNR)
{
printf(" %8.4lf ",
getxPSNR() / (Double)getNumPic());
}
#endif
#if EXTENSION_360_VIDEO
m_ext360.printPSNRs(getNumPic());
......
......@@ -148,10 +148,8 @@ protected:
Bool m_printFrameMSE;
Bool m_printSequenceMSE;
Bool m_printMSSSIM;
#if JCTVC_Y0037_XPSNR
Bool m_bXPSNREnableFlag;
Double m_dXPSNRWeight[MAX_NUM_COMPONENT];
#endif
Bool m_cabacZeroWordPaddingEnabled;
/* profile & level */
......@@ -594,13 +592,11 @@ public:
Bool getPrintMSSSIM () const { return m_printMSSSIM; }
Void setPrintMSSSIM (Bool value) { m_printMSSSIM = value; }
#if JCTVC_Y0037_XPSNR
Bool getXPSNREnableFlag () const { return m_bXPSNREnableFlag;}
Double getXPSNRWeight (const ComponentID id) const { return m_dXPSNRWeight[id];}
Void setXPSNREnableFlag ( Bool i ) { m_bXPSNREnableFlag = i; }
Void setXPSNRWeight ( Double dValue, ComponentID id) { m_dXPSNRWeight[id] = dValue;}
#endif
Bool getCabacZeroWordPaddingEnabled() const { return m_cabacZeroWordPaddingEnabled; }
Void setCabacZeroWordPaddingEnabled(Bool value) { m_cabacZeroWordPaddingEnabled = value; }
......
......@@ -2362,7 +2362,6 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
//===== calculate PSNR =====
#if JCTVC_Y0037_XPSNR
if (outputLogCtrl.printXPSNR && pcPicD->getChromaFormat() != CHROMA_400)
{
const Pel* pOrg[MAX_NUM_COMPONENT];
......@@ -2444,7 +2443,6 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
result.xpsnr = dSSDtemp ? 20.0 * log10( fWValue / dSSDtemp) : 999.99;
}
else
#endif
{
for(Int chan=0; chan<pcPicD->getNumberValidComponents(); chan++)
{
......@@ -2601,12 +2599,10 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
{
printf(" [MS-SSIM Y %1.6lf U %1.6lf V %1.6lf]", result.MSSSIM[COMPONENT_Y], result.MSSSIM[COMPONENT_Cb], result.MSSSIM[COMPONENT_Cr] );
}
#if JCTVC_Y0037_XPSNR
if (outputLogCtrl.printXPSNR)
{
printf(" [xPSNR %6.4lf dB]", result.xpsnr);
}
#endif
if (outputLogCtrl.printFrameMSE)
{
printf(" [Y MSE %6.4lf U MSE %6.4lf V MSE %6.4lf]", result.MSEyuvframe[COMPONENT_Y], result.MSEyuvframe[COMPONENT_Cb], result.MSEyuvframe[COMPONENT_Cr] );
......@@ -2829,7 +2825,6 @@ Void TEncGOP::xCalculateInterlacedAddPSNR( TComPic* pcPicOrgFirstField, TComPic*
const UInt numValidComponents=apcPicRecFields[0]->getNumberValidComponents();
const Bool useTrueOrg = conversion != IPCOLOURSPACE_UNCHANGED || m_pcCfg->getGopBasedTemporalFilterEnabled();
#if JCTVC_Y0037_XPSNR
if (outputLogCtrl.printXPSNR && apcPicRecFields[0]->getChromaFormat() != CHROMA_400 && apcPicRecFields[1]->getChromaFormat() != CHROMA_400)
{
// For interlace images, we need to scan the two fields independently
......@@ -2917,7 +2912,6 @@ Void TEncGOP::xCalculateInterlacedAddPSNR( TComPic* pcPicOrgFirstField, TComPic*
result.xpsnr = dSSDtemp ? 20.0 * log10( fWValue / dSSDtemp) : 999.99;
}
else
#endif
{
for(Int chan=0; chan<numValidComponents; chan++)
{
......
......@@ -186,9 +186,7 @@ public:
outputLogCtrl.printMSEBasedSNR=m_printMSEBasedSequencePSNR;
outputLogCtrl.printMSSSIM=m_printMSSSIM;
outputLogCtrl.printSequenceMSE=m_printSequenceMSE;
#if JCTVC_Y0037_XPSNR
outputLogCtrl.printXPSNR=m_bXPSNREnableFlag;
#endif
outputLogCtrl.printHexPerPOCPSNRs=m_printHexPsnr;
return outputLogCtrl;
}
......
Supports Markdown
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