Changeset 1412 in 3DVCSoftware for branches/HTM-16.2-dev/source/Lib/TLibEncoder/TEncAnalyze.h
- Timestamp:
- 12 Apr 2018, 11:12:21 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.2-dev/source/Lib/TLibEncoder/TEncAnalyze.h
r1405 r1412 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 6, ITU/ISO/IEC6 * Copyright (c) 2010-2017, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 49 49 #include "TLibCommon/TComChromaFormat.h" 50 50 #include "math.h" 51 #if EXTENSION_360_VIDEO 52 #include "TAppEncHelper360/TExt360EncAnalyze.h" 53 #endif 51 54 52 55 //! \ingroup TLibEncoder … … 66 69 Double m_dFrmRate; //--CFG_KDY 67 70 Double m_MSEyuvframe[MAX_NUM_COMPONENT]; // sum of MSEs 71 #if JVET_F0064_MSSSIM 72 Double m_MSSSIM[MAX_NUM_COMPONENT]; 73 #endif 74 75 #if EXTENSION_360_VIDEO 76 TExt360EncAnalyze m_ext360; 77 #endif 68 78 69 79 public: … … 71 81 TEncAnalyze() { clear(); } 72 82 73 Void addResult( Double psnr[MAX_NUM_COMPONENT], Double bits, const Double MSEyuvframe[MAX_NUM_COMPONENT]) 74 { 83 #if JVET_F0064_MSSSIM 84 Void addResult( Double psnr[MAX_NUM_COMPONENT], Double bits, const Double MSEyuvframe[MAX_NUM_COMPONENT], const Double MSSSIM[MAX_NUM_COMPONENT] ) { 85 #else 86 Void addResult( Double psnr[MAX_NUM_COMPONENT], Double bits, const Double MSEyuvframe[MAX_NUM_COMPONENT] ) { 87 #endif 75 88 m_dAddBits += bits; 76 89 for(UInt i=0; i<MAX_NUM_COMPONENT; i++) … … 78 91 m_dPSNRSum[i] += psnr[i]; 79 92 m_MSEyuvframe[i] += MSEyuvframe[i]; 93 #if JVET_F0064_MSSSIM 94 m_MSSSIM[i] += MSSSIM[i]; 95 #endif 80 96 } 81 97 … … 84 100 85 101 Double getPsnr(ComponentID compID) const { return m_dPSNRSum[compID]; } 102 #if JVET_F0064_MSSSIM 103 Double getMsssim(ComponentID compID) const { return m_MSSSIM[compID]; } 104 #endif 86 105 Double getBits() const { return m_dAddBits; } 87 106 Void setBits(Double numBits) { m_dAddBits=numBits; } 88 107 UInt getNumPic() const { return m_uiNumPic; } 108 #if EXTENSION_360_VIDEO 109 TExt360EncAnalyze& getExt360Info() { return m_ext360; } 110 #endif 89 111 90 112 Void setFrmRate (Double dFrameRate) { m_dFrmRate = dFrameRate; } //--CFG_KDY … … 96 118 m_dPSNRSum[i] = 0; 97 119 m_MSEyuvframe[i] = 0; 120 #if JVET_F0064_MSSSIM 121 m_MSSSIM[i] = 0; 122 #endif 98 123 } 99 124 m_uiNumPic = 0; 125 #if EXTENSION_360_VIDEO 126 m_ext360.clear(); 127 #endif 100 128 } 101 129 … … 137 165 138 166 167 #if JVET_F0064_MSSSIM 168 Void printOut ( TChar cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const Bool printMSSSIM, const BitDepths &bitDepths ) 169 #else 139 170 Void printOut ( TChar cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ) 171 #endif 140 172 { 141 173 Double dFps = m_dFrmRate; //--CFG_KDY … … 171 203 printf( " \tTotal Frames | " "Bitrate " "Y-PSNR" ); 172 204 205 #if JVET_F0064_MSSSIM 206 if (printMSSSIM) 207 { 208 printf( " Y-MS-SSIM"); 209 } 210 #endif 173 211 if (printSequenceMSE) 174 212 { … … 186 224 getPsnr(COMPONENT_Y) / (Double)getNumPic() ); 187 225 226 #if JVET_F0064_MSSSIM 227 if (printMSSSIM) 228 { 229 printf(" %8.6lf", getMsssim(COMPONENT_Y) / (Double)getNumPic()); 230 } 231 #endif 232 188 233 if (printSequenceMSE) 189 234 { … … 203 248 { 204 249 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR" ); 250 251 #if JVET_F0064_MSSSIM 252 if (printMSSSIM) 253 { 254 printf( "Y-MS-SSIM"); 255 } 256 #endif 205 257 206 258 if (printSequenceMSE) … … 219 271 getPsnr(COMPONENT_Y) / (Double)getNumPic() ); 220 272 273 #if JVET_F0064_MSSSIM 274 if (printMSSSIM) 275 { 276 printf("%8.6lf", getMsssim(COMPONENT_Y) / (Double)getNumPic()); 277 } 278 #endif 221 279 if (printSequenceMSE) 222 280 { … … 242 300 printf( " \tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR " "YUV-PSNR " ); 243 301 302 #if JVET_F0064_MSSSIM 303 if (printMSSSIM) 304 { 305 printf(" Y-MS-SSIM " "U-MS-SSIM " "V-MS-SSIM "); 306 } 307 #endif 244 308 if (printSequenceMSE) 245 309 { … … 260 324 PSNRyuv ); 261 325 326 #if JVET_F0064_MSSSIM 327 if (printMSSSIM) 328 { 329 printf(" %8.6lf " "%8.6lf " "%8.6lf ", 330 getMsssim(COMPONENT_Y) / (Double)getNumPic(), 331 getMsssim(COMPONENT_Cb) / (Double)getNumPic(), 332 getMsssim(COMPONENT_Cr) / (Double)getNumPic()); 333 } 334 #endif 262 335 if (printSequenceMSE) 263 336 { … … 285 358 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR " "YUV-PSNR " ); 286 359 360 #if JVET_F0064_MSSSIM 361 if (printMSSSIM) 362 { 363 printf(" Y-MS-SSIM " "U-MS-SSIM " "V-MS-SSIM "); 364 } 365 #endif 366 367 #if EXTENSION_360_VIDEO 368 m_ext360.printHeader(); 369 #endif 370 287 371 if (printSequenceMSE) 288 372 { … … 303 387 PSNRyuv ); 304 388 389 #if JVET_F0064_MSSSIM 390 if (printMSSSIM) 391 { 392 printf(" %8.6lf " "%8.6lf " "%8.6lf ", 393 getMsssim(COMPONENT_Y) / (Double)getNumPic(), 394 getMsssim(COMPONENT_Cb) / (Double)getNumPic(), 395 getMsssim(COMPONENT_Cr) / (Double)getNumPic()); 396 } 397 #endif 398 399 #if EXTENSION_360_VIDEO 400 m_ext360.printPSNRs(getNumPic()); 401 #endif 402 305 403 if (printSequenceMSE) 306 404 {
Note: See TracChangeset for help on using the changeset viewer.