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

remove macro JVET_E0059_FLOATING_POINT_QP_FIX

parent 7d1715a6
......@@ -553,7 +553,6 @@ istream& SMultiValueInput<T>::readValues(std::istream &in)
return in;
}
#if JVET_E0059_FLOATING_POINT_QP_FIX
template <class T>
static inline istream& operator >> (std::istream &in, TAppEncCfg::OptionalValue<T> &value)
{
......@@ -569,7 +568,6 @@ static inline istream& operator >> (std::istream &in, TAppEncCfg::OptionalValue<
}
return in;
}
#endif
template <class T1, class T2>
static inline istream& operator >> (std::istream &in, std::map<T1, T2> &map)
......@@ -912,12 +910,8 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("IQPFactor,-IQF", m_dIntraQpFactor, -1.0, "Intra QP Factor for Lambda Computation. If negative, the default will scale lambda based on GOP size (unless LambdaFromQpEnable then IntraQPOffset is used instead)")
/* Quantization parameters */
#if JVET_E0059_FLOATING_POINT_QP_FIX
("QP,q", m_iQP, 30, "Qp value")
("QPIncrementFrame,-qpif", m_qpIncrementAtSourceFrame, OptionalValue<UInt>(), "If a source file frame number is specified, the internal QP will be incremented for all POCs associated with source frames >= frame number. If empty, do not increment.")
#else
("QP,q", m_fQP, 30.0, "Qp value, if value is float, QP is switched once during encoding")
#endif
#if X0038_LAMBDA_FROM_QP_CAPABILITY
("IntraQPOffset", m_intraQPOffset, 0, "Qp offset value for intra slice, typically determined based on GOP size")
("LambdaFromQpEnable", m_lambdaFromQPEnable, false, "Enable flag for derivation of lambda from QP")
......@@ -1778,7 +1772,6 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ];
::memset( m_aidQP, 0, sizeof(Int)*( m_framesToBeEncoded + m_iGOPSize + 1 ) );
#if JVET_E0059_FLOATING_POINT_QP_FIX
if (m_qpIncrementAtSourceFrame.bPresent)
{
UInt switchingPOC=0;
......@@ -1794,21 +1787,6 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
m_aidQP[i]=1;
}
}
#else
// handling of floating-point QP values
// if QP is not integer, sequence is split into two sections having QP and QP+1
m_iQP = (Int)( m_fQP );
if ( m_iQP < m_fQP )
{
Int iSwitchPOC = (Int)( m_framesToBeEncoded - (m_fQP - m_iQP)*m_framesToBeEncoded + 0.5 );
iSwitchPOC = (Int)( (Double)iSwitchPOC / m_iGOPSize + 0.5 )*m_iGOPSize;
for ( Int i=iSwitchPOC; i<m_framesToBeEncoded + m_iGOPSize + 1; i++ )
{
m_aidQP[i] = 1;
}
}
#endif
for(UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)
{
......@@ -3236,7 +3214,6 @@ Void TAppEncCfg::xPrintParameter()
printf("Motion search range : %d\n", m_iSearchRange );
printf("Intra period : %d\n", m_iIntraPeriod );
printf("Decoding refresh type : %d\n", m_iDecodingRefreshType );
#if JVET_E0059_FLOATING_POINT_QP_FIX
if (m_qpIncrementAtSourceFrame.bPresent)
{
printf("QP : %d (incrementing internal QP at source frame %d)\n", m_iQP, m_qpIncrementAtSourceFrame.value );
......@@ -3245,9 +3222,6 @@ Void TAppEncCfg::xPrintParameter()
{
printf("QP : %d\n", m_iQP );
}
#else
printf("QP : %5.2f\n", m_fQP );
#endif
printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth);
printf("Cb QP Offset : %d\n", m_cbQpOffset );
......
......@@ -60,7 +60,6 @@ namespace po = df::program_options_lite;
/// encoder configuration class
class TAppEncCfg
{
#if JVET_E0059_FLOATING_POINT_QP_FIX
public:
template <class T>
struct OptionalValue
......@@ -69,7 +68,6 @@ public:
T value;
OptionalValue() : bPresent(false), value() { }
};
#endif
protected:
// file I/O
......@@ -165,11 +163,7 @@ protected:
Bool m_cabacBypassAlignmentEnabledFlag;
// coding quality
#if JVET_E0059_FLOATING_POINT_QP_FIX
OptionalValue<UInt> m_qpIncrementAtSourceFrame; ///< Optional source frame number at which all subsequent frames are to use an increased internal QP.
#else
Double m_fQP; ///< QP value of key-picture (floating point)
#endif
Int m_iQP; ///< QP value of key-picture (integer)
#if X0038_LAMBDA_FROM_QP_CAPABILITY
Int m_intraQPOffset; ///< QP offset for intra slice (integer)
......
......@@ -90,7 +90,6 @@
#define X0038_LAMBDA_FROM_QP_CAPABILITY 1 ///< This approach derives lambda from QP+QPoffset+QPoffset2. QPoffset2 is derived from QP+QPoffset using a linear model that is clipped between 0 and 3.
// To use this capability enable config parameter LambdaFromQpEnable
#define JVET_E0059_FLOATING_POINT_QP_FIX 1 ///< Replace floating point QP with a source-file frame number.
#define JVET_G0101_QP_SWITCHING 1 ///< After switching POC, increase base QP instead of frame level QP.
#define JVET_F0064_MSSSIM 1 ///< Calculate MS-SSIM scores
......
Markdown is supported
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