Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jvet
HM
Commits
1677e87e
Commit
1677e87e
authored
Mar 16, 2020
by
Karl Sharman
Browse files
remove macro JVET_F0064_MSSSIM
parent
00ebd693
Changes
9
Hide whitespace changes
Inline
Side-by-side
source/App/TAppEncoder/TAppEncCfg.cpp
View file @
1677e87e
...
...
@@ -809,9 +809,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("PrintHexPSNR", m_printHexPsnr, false, "0 (default) don't emit hexadecimal PSNR for each frame, 1 = also emit hexadecimal PSNR values")
("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")
#if JVET_F0064_MSSSIM
("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")
#endif
#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)")
...
...
@@ -3137,9 +3135,7 @@ Void TAppEncCfg::xPrintParameter()
printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );
printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
printf("Frame MSE output : %s\n", (m_printFrameMSE ? "Enabled" : "Disabled") );
#if JVET_F0064_MSSSIM
printf("MS-SSIM output : %s\n", (m_printMSSSIM ? "Enabled" : "Disabled") );
#endif
#if JCTVC_Y0037_XPSNR
printf("xPSNR calculation : %s\n", (m_bXPSNREnableFlag ? "Enabled" : "Disabled"));
if (m_bXPSNREnableFlag)
...
...
source/App/TAppEncoder/TAppEncCfg.h
View file @
1677e87e
...
...
@@ -113,9 +113,7 @@ protected:
Bool
m_printHexPsnr
;
Bool
m_printFrameMSE
;
Bool
m_printSequenceMSE
;
#if JVET_F0064_MSSSIM
Bool
m_printMSSSIM
;
#endif
#if JCTVC_Y0037_XPSNR
Bool
m_bXPSNREnableFlag
;
///< xPSNR enable flag
...
...
source/App/TAppEncoder/TAppEncTop.cpp
View file @
1677e87e
...
...
@@ -104,9 +104,7 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop
.
setPrintHexPsnr
(
m_printHexPsnr
);
m_cTEncTop
.
setPrintFrameMSE
(
m_printFrameMSE
);
m_cTEncTop
.
setPrintSequenceMSE
(
m_printSequenceMSE
);
#if JVET_F0064_MSSSIM
m_cTEncTop
.
setPrintMSSSIM
(
m_printMSSSIM
);
#endif
#if JCTVC_Y0037_XPSNR
m_cTEncTop
.
setXPSNREnableFlag
(
m_bXPSNREnableFlag
);
...
...
source/Lib/TLibCommon/TypeDef.h
View file @
1677e87e
...
...
@@ -91,7 +91,6 @@
// To use this capability enable config parameter LambdaFromQpEnable
#define JVET_F0064_MSSSIM 1 ///< Calculate MS-SSIM scores
#define JCTVC_Y0037_XPSNR 1 ///< Enable xPSNR (Cross-Component PSNR) computation
#ifndef EXTENSION_360_VIDEO
...
...
source/Lib/TLibEncoder/TEncAnalyze.h
View file @
1677e87e
...
...
@@ -68,9 +68,7 @@ public:
Bool
printMSEBasedSNR
;
Bool
printSequenceMSE
;
Bool
printFrameMSE
;
#if JVET_F0064_MSSSIM
Bool
printMSSSIM
;
#endif
#if JCTVC_Y0037_XPSNR
Bool
printXPSNR
;
#endif
...
...
@@ -88,17 +86,13 @@ public:
{
psnr
[
i
]
=
0
;
MSEyuvframe
[
i
]
=
0
;
#if JVET_F0064_MSSSIM
MSSSIM
[
i
]
=
0
;
#endif
}
}
Double
psnr
[
MAX_NUM_COMPONENT
];
Double
bits
;
Double
MSEyuvframe
[
MAX_NUM_COMPONENT
];
#if JVET_F0064_MSSSIM
Double
MSSSIM
[
MAX_NUM_COMPONENT
];
#endif
#if JCTVC_Y0037_XPSNR
Double
xpsnr
;
#endif
...
...
@@ -124,9 +118,7 @@ public:
{
m_runningTotal
.
psnr
[
i
]
+=
result
.
psnr
[
i
];
m_runningTotal
.
MSEyuvframe
[
i
]
+=
result
.
MSEyuvframe
[
i
];
#if JVET_F0064_MSSSIM
m_runningTotal
.
MSSSIM
[
i
]
+=
result
.
MSSSIM
[
i
];
#endif
}
#if JCTVC_Y0037_XPSNR
...
...
@@ -136,9 +128,7 @@ public:
}
Double
getPsnr
(
ComponentID
compID
)
const
{
return
m_runningTotal
.
psnr
[
compID
];
}
#if JVET_F0064_MSSSIM
Double
getMsssim
(
ComponentID
compID
)
const
{
return
m_runningTotal
.
MSSSIM
[
compID
];
}
#endif
#if JCTVC_Y0037_XPSNR
Double
getxPSNR
()
const
{
return
m_runningTotal
.
xpsnr
;}
#endif
...
...
@@ -232,12 +222,10 @@ public:
printf
(
"
\t
Total Frames | "
"Bitrate "
"Y-PSNR "
);
#if JVET_F0064_MSSSIM
if
(
logctrl
.
printMSSSIM
)
{
printf
(
" Y-MS-SSIM "
);
}
#endif
#if JCTVC_Y0037_XPSNR
if
(
logctrl
.
printXPSNR
)
...
...
@@ -266,12 +254,10 @@ public:
getBits
()
*
dScale
,
getPsnr
(
COMPONENT_Y
)
/
(
Double
)
getNumPic
()
);
#if JVET_F0064_MSSSIM
if
(
logctrl
.
printMSSSIM
)
{
printf
(
" %8.6lf "
,
getMsssim
(
COMPONENT_Y
)
/
(
Double
)
getNumPic
());
}
#endif
#if JCTVC_Y0037_XPSNR
if
(
logctrl
.
printXPSNR
)
{
...
...
@@ -314,12 +300,10 @@ public:
printf
(
"
\t
Total Frames | "
"Bitrate "
"Y-PSNR "
"U-PSNR "
"V-PSNR "
"YUV-PSNR "
);
#if JVET_F0064_MSSSIM
if
(
logctrl
.
printMSSSIM
)
{
printf
(
" Y-MS-SSIM "
"U-MS-SSIM "
"V-MS-SSIM "
);
}
#endif
#if JCTVC_Y0037_XPSNR
if
(
logctrl
.
printXPSNR
)
{
...
...
@@ -352,7 +336,6 @@ public:
getPsnr
(
COMPONENT_Cr
)
/
(
Double
)
getNumPic
(),
PSNRyuv
);
#if JVET_F0064_MSSSIM
if
(
logctrl
.
printMSSSIM
)
{
printf
(
" %8.6lf "
"%8.6lf "
"%8.6lf "
,
...
...
@@ -360,7 +343,6 @@ public:
getMsssim
(
COMPONENT_Cb
)
/
(
Double
)
getNumPic
(),
getMsssim
(
COMPONENT_Cr
)
/
(
Double
)
getNumPic
());
}
#endif
#if JCTVC_Y0037_XPSNR
if
(
logctrl
.
printXPSNR
)
...
...
source/Lib/TLibEncoder/TEncCfg.h
View file @
1677e87e
...
...
@@ -147,9 +147,7 @@ protected:
Bool
m_printHexPsnr
;
Bool
m_printFrameMSE
;
Bool
m_printSequenceMSE
;
#if JVET_F0064_MSSSIM
Bool
m_printMSSSIM
;
#endif
#if JCTVC_Y0037_XPSNR
Bool
m_bXPSNREnableFlag
;
Double
m_dXPSNRWeight
[
MAX_NUM_COMPONENT
];
...
...
@@ -593,10 +591,8 @@ public:
Bool
getPrintSequenceMSE
()
const
{
return
m_printSequenceMSE
;
}
Void
setPrintSequenceMSE
(
Bool
value
)
{
m_printSequenceMSE
=
value
;
}
#if JVET_F0064_MSSSIM
Bool
getPrintMSSSIM
()
const
{
return
m_printMSSSIM
;
}
Void
setPrintMSSSIM
(
Bool
value
)
{
m_printMSSSIM
=
value
;
}
#endif
#if JCTVC_Y0037_XPSNR
Bool
getXPSNREnableFlag
()
const
{
return
m_bXPSNREnableFlag
;}
...
...
source/Lib/TLibEncoder/TEncGOP.cpp
View file @
1677e87e
...
...
@@ -2479,7 +2479,6 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
m_ext360
.
calculatePSNRs
(
pcPic
);
#endif
#if JVET_F0064_MSSSIM
//===== calculate MS-SSIM =====
if
(
outputLogCtrl
.
printMSSSIM
)
{
...
...
@@ -2497,7 +2496,6 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
result
.
MSSSIM
[
ch
]
=
xCalculateMSSSIM
(
pOrg
,
orgStride
,
pRec
,
recStride
,
width
,
height
,
bitDepth
);
}
}
#endif
/* calculate the size of the access unit, excluding:
* - SEI NAL units
...
...
@@ -2599,12 +2597,10 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
printf
(
" [xY %16"
PRIx64
" xU %16"
PRIx64
" xv %16"
PRIx64
"]"
,
xPsnr
[
COMPONENT_Y
],
xPsnr
[
COMPONENT_Cb
],
xPsnr
[
COMPONENT_Cr
]);
}
#if JVET_F0064_MSSSIM
if
(
outputLogCtrl
.
printMSSSIM
)
{
printf
(
" [MS-SSIM Y %1.6lf U %1.6lf V %1.6lf]"
,
result
.
MSSSIM
[
COMPONENT_Y
],
result
.
MSSSIM
[
COMPONENT_Cb
],
result
.
MSSSIM
[
COMPONENT_Cr
]
);
}
#endif
#if JCTVC_Y0037_XPSNR
if
(
outputLogCtrl
.
printXPSNR
)
{
...
...
@@ -2635,7 +2631,6 @@ Void TEncGOP::xCalculateAddPSNR( TComPic* pcPic, TComPicYuv* pcPicD, const Acces
cscd
.
destroy
();
}
#if JVET_F0064_MSSSIM
Double
TEncGOP
::
xCalculateMSSSIM
(
const
Pel
*
pOrg
,
const
Int
orgStride
,
const
Pel
*
pRec
,
const
Int
recStride
,
const
Int
width
,
const
Int
height
,
const
UInt
bitDepth
)
{
const
Int
MAX_MSSSIM_SCALE
=
5
;
...
...
@@ -2805,7 +2800,6 @@ Double TEncGOP::xCalculateMSSSIM (const Pel *pOrg, const Int orgStride, const Pe
return
finalMSSSIM
;
}
#endif
Void
TEncGOP
::
xCalculateInterlacedAddPSNR
(
TComPic
*
pcPicOrgFirstField
,
TComPic
*
pcPicOrgSecondField
,
...
...
@@ -2964,7 +2958,6 @@ Void TEncGOP::xCalculateInterlacedAddPSNR( TComPic* pcPicOrgFirstField, TComPic*
result
.
MSEyuvframe
[
ch
]
=
(
Double
)
uiSSDtemp
/
(
iSize
*
2
);
}
}
#if JVET_F0064_MSSSIM
//===== calculate MS-SSIM =====
if
(
outputLogCtrl
.
printMSSSIM
)
{
...
...
@@ -2995,7 +2988,6 @@ Void TEncGOP::xCalculateInterlacedAddPSNR( TComPic* pcPicOrgFirstField, TComPic*
result
.
MSSSIM
[
ch
]
=
sumOverFieldsMSSSIM
/
2
;
}
}
#endif
result
.
bits
=
0
;
// the number of bits for the pair is not calculated here - instead the overall total is used elsewhere.
...
...
@@ -3018,12 +3010,10 @@ Void TEncGOP::xCalculateInterlacedAddPSNR( TComPic* pcPicOrgFirstField, TComPic*
printf
(
" [xY %16"
PRIx64
" xU %16"
PRIx64
" xv %16"
PRIx64
"]"
,
xPsnr
[
COMPONENT_Y
],
xPsnr
[
COMPONENT_Cb
],
xPsnr
[
COMPONENT_Cr
]);
}
#if JVET_F0064_MSSSIM
if
(
outputLogCtrl
.
printMSSSIM
)
{
printf
(
" [MS-SSIM Y %1.6lf U %1.6lf V %1.6lf]"
,
result
.
MSSSIM
[
COMPONENT_Y
],
result
.
MSSSIM
[
COMPONENT_Cb
],
result
.
MSSSIM
[
COMPONENT_Cr
]
);
}
#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
]
);
...
...
source/Lib/TLibEncoder/TEncGOP.h
View file @
1677e87e
...
...
@@ -198,9 +198,7 @@ protected:
Void
xCalculateInterlacedAddPSNR
(
TComPic
*
pcPicOrgFirstField
,
TComPic
*
pcPicOrgSecondField
,
TComPicYuv
*
pcPicRecFirstField
,
TComPicYuv
*
pcPicRecSecondField
,
const
InputColourSpaceConversion
snr_conversion
,
const
TEncAnalyze
::
OutputLogControl
&
outputLogCtrl
,
Double
*
PSNR_Y
);
#if JVET_F0064_MSSSIM
Double
xCalculateMSSSIM
(
const
Pel
*
pOrg
,
const
Int
orgStride
,
const
Pel
*
pRec
,
const
Int
recStride
,
const
Int
width
,
const
Int
height
,
const
UInt
bitDepth
);
#endif
UInt64
xFindDistortionFrame
(
TComPicYuv
*
pcPic0
,
TComPicYuv
*
pcPic1
,
const
BitDepths
&
bitDepths
);
...
...
source/Lib/TLibEncoder/TEncTop.h
View file @
1677e87e
...
...
@@ -184,9 +184,7 @@ public:
TEncAnalyze
::
OutputLogControl
outputLogCtrl
;
outputLogCtrl
.
printFrameMSE
=
m_printFrameMSE
;
outputLogCtrl
.
printMSEBasedSNR
=
m_printMSEBasedSequencePSNR
;
#if JVET_F0064_MSSSIM
outputLogCtrl
.
printMSSSIM
=
m_printMSSSIM
;
#endif
outputLogCtrl
.
printSequenceMSE
=
m_printSequenceMSE
;
#if JCTVC_Y0037_XPSNR
outputLogCtrl
.
printXPSNR
=
m_bXPSNREnableFlag
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment