Commit 52586e96 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0646_GBI

parent 84a6aa20
...@@ -237,10 +237,8 @@ void EncApp::xInitLibCfg() ...@@ -237,10 +237,8 @@ void EncApp::xInitLibCfg()
m_cEncLib.setInterEMT ( ( m_EMT >> 1 ) & 1 ); m_cEncLib.setInterEMT ( ( m_EMT >> 1 ) & 1 );
m_cEncLib.setFastInterEMT ( ( m_FastEMT >> 1 ) & ( m_EMT >> 1 ) & 1 ); m_cEncLib.setFastInterEMT ( ( m_FastEMT >> 1 ) & ( m_EMT >> 1 ) & 1 );
m_cEncLib.setUseCompositeRef ( m_compositeRefEnabled ); m_cEncLib.setUseCompositeRef ( m_compositeRefEnabled );
#if JVET_L0646_GBI
m_cEncLib.setUseGBi ( m_GBi ); m_cEncLib.setUseGBi ( m_GBi );
m_cEncLib.setUseGBiFast ( m_GBiFast ); m_cEncLib.setUseGBiFast ( m_GBiFast );
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
m_cEncLib.setUseLadf ( m_LadfEnabed ); m_cEncLib.setUseLadf ( m_LadfEnabed );
if ( m_LadfEnabed ) if ( m_LadfEnabed )
......
...@@ -844,10 +844,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -844,10 +844,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
"\t2: Enable fast methods only for Inter EMT\n" "\t2: Enable fast methods only for Inter EMT\n"
"\t3: Enable fast methods for both Intra & Inter EMT\n") "\t3: Enable fast methods for both Intra & Inter EMT\n")
("CompositeLTReference", m_compositeRefEnabled, false, "Enable Composite Long Term Reference Frame") ("CompositeLTReference", m_compositeRefEnabled, false, "Enable Composite Long Term Reference Frame")
#if JVET_L0646_GBI
("GBi", m_GBi, false, "Enable Generalized Bi-prediction(GBi)") ("GBi", m_GBi, false, "Enable Generalized Bi-prediction(GBi)")
("GBiFast", m_GBiFast, false, "Fast methods for Generalized Bi-prediction(GBi)\n") ("GBiFast", m_GBiFast, false, "Fast methods for Generalized Bi-prediction(GBi)\n")
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
("LADF", m_LadfEnabed, false, "Luma adaptive deblocking filter QP Offset(L0414)") ("LADF", m_LadfEnabed, false, "Luma adaptive deblocking filter QP Offset(L0414)")
("LadfNumIntervals", m_LadfNumIntervals, 3, "LADF number of intervals (2-5, inclusive)") ("LadfNumIntervals", m_LadfNumIntervals, 3, "LADF number of intervals (2-5, inclusive)")
...@@ -1938,10 +1936,8 @@ bool EncAppCfg::xCheckParameter() ...@@ -1938,10 +1936,8 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_EMT, "EMT only allowed with NEXT profile" ); xConfirmPara( m_EMT, "EMT only allowed with NEXT profile" );
xConfirmPara( m_FastEMT, "EMT only allowed with NEXT profile" ); xConfirmPara( m_FastEMT, "EMT only allowed with NEXT profile" );
xConfirmPara( m_compositeRefEnabled, "Composite Reference Frame is only allowed with NEXT profile" ); xConfirmPara( m_compositeRefEnabled, "Composite Reference Frame is only allowed with NEXT profile" );
#if JVET_L0646_GBI
xConfirmPara( m_GBi, "GBi is only allowed with NEXT profile" ); xConfirmPara( m_GBi, "GBi is only allowed with NEXT profile" );
xConfirmPara( m_GBiFast, "GBiFast is only allowed with NEXT profile" ); xConfirmPara( m_GBiFast, "GBiFast is only allowed with NEXT profile" );
#endif
xConfirmPara( m_Triangle, "Triangle is only allowed with NEXT profile" ); xConfirmPara( m_Triangle, "Triangle is only allowed with NEXT profile" );
// ADD_NEW_TOOL : (parameter check) add a check for next tools here // ADD_NEW_TOOL : (parameter check) add a check for next tools here
} }
...@@ -3129,10 +3125,8 @@ void EncAppCfg::xPrintParameter() ...@@ -3129,10 +3125,8 @@ void EncAppCfg::xPrintParameter()
msg( VERBOSE, "LMChroma:%d ", m_LMChroma ); msg( VERBOSE, "LMChroma:%d ", m_LMChroma );
msg( VERBOSE, "EMT: %1d(intra) %1d(inter) ", m_EMT & 1, ( m_EMT >> 1 ) & 1 ); msg( VERBOSE, "EMT: %1d(intra) %1d(inter) ", m_EMT & 1, ( m_EMT >> 1 ) & 1 );
msg(VERBOSE, "CompositeLTReference:%d ", m_compositeRefEnabled); msg(VERBOSE, "CompositeLTReference:%d ", m_compositeRefEnabled);
#if JVET_L0646_GBI
msg( VERBOSE, "GBi:%d ", m_GBi ); msg( VERBOSE, "GBi:%d ", m_GBi );
msg( VERBOSE, "GBiFast:%d ", m_GBiFast ); msg( VERBOSE, "GBiFast:%d ", m_GBiFast );
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
msg( VERBOSE, "LADF:%d ", m_LadfEnabed ); msg( VERBOSE, "LADF:%d ", m_LadfEnabed );
#endif #endif
......
...@@ -223,10 +223,8 @@ protected: ...@@ -223,10 +223,8 @@ protected:
int m_FastEMT; ///< XZ: Fast Methods of Enhanced Multiple Transform int m_FastEMT; ///< XZ: Fast Methods of Enhanced Multiple Transform
bool m_compositeRefEnabled; bool m_compositeRefEnabled;
#if JVET_L0646_GBI
bool m_GBi; bool m_GBi;
bool m_GBiFast; bool m_GBiFast;
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
bool m_LadfEnabed; bool m_LadfEnabed;
int m_LadfNumIntervals; int m_LadfNumIntervals;
......
...@@ -192,7 +192,7 @@ void calcBlkGradientCore(int sx, int sy, int *arraysGx2, int *arraysGxGy ...@@ -192,7 +192,7 @@ void calcBlkGradientCore(int sx, int sy, int *arraysGx2, int *arraysGxGy
} }
} }
#if ENABLE_SIMD_OPT_GBI && JVET_L0646_GBI #if ENABLE_SIMD_OPT_GBI
void removeWeightHighFreq(int16_t* dst, int dstStride, const int16_t* src, int srcStride, int width, int height, int shift, int gbiWeight) void removeWeightHighFreq(int16_t* dst, int dstStride, const int16_t* src, int srcStride, int width, int height, int shift, int gbiWeight)
{ {
int normalizer = ((1 << 16) + (gbiWeight > 0 ? (gbiWeight >> 1) : -(gbiWeight >> 1))) / gbiWeight; int normalizer = ((1 << 16) + (gbiWeight > 0 ? (gbiWeight >> 1) : -(gbiWeight >> 1))) / gbiWeight;
...@@ -289,7 +289,6 @@ PelBufferOps g_pelBufOP = PelBufferOps(); ...@@ -289,7 +289,6 @@ PelBufferOps g_pelBufOP = PelBufferOps();
#endif #endif
#endif #endif
#if JVET_L0646_GBI
template<> template<>
void AreaBuf<Pel>::addWeightedAvg(const AreaBuf<const Pel> &other1, const AreaBuf<const Pel> &other2, const ClpRng& clpRng, const int8_t gbiIdx) void AreaBuf<Pel>::addWeightedAvg(const AreaBuf<const Pel> &other1, const AreaBuf<const Pel> &other2, const ClpRng& clpRng, const int8_t gbiIdx)
{ {
...@@ -319,7 +318,6 @@ void AreaBuf<Pel>::addWeightedAvg(const AreaBuf<const Pel> &other1, const AreaBu ...@@ -319,7 +318,6 @@ void AreaBuf<Pel>::addWeightedAvg(const AreaBuf<const Pel> &other1, const AreaBu
#undef ADD_AVG_OP #undef ADD_AVG_OP
#undef ADD_AVG_INC #undef ADD_AVG_INC
} }
#endif
template<> template<>
void AreaBuf<Pel>::addAvg( const AreaBuf<const Pel> &other1, const AreaBuf<const Pel> &other2, const ClpRng& clpRng) void AreaBuf<Pel>::addAvg( const AreaBuf<const Pel> &other1, const AreaBuf<const Pel> &other2, const ClpRng& clpRng)
......
...@@ -114,10 +114,8 @@ struct AreaBuf : public Size ...@@ -114,10 +114,8 @@ struct AreaBuf : public Size
void subtract ( const AreaBuf<const T> &other ); void subtract ( const AreaBuf<const T> &other );
void extendSingleBorderPel(); void extendSingleBorderPel();
void extendBorderPel ( unsigned margin ); void extendBorderPel ( unsigned margin );
#if JVET_L0646_GBI
void addWeightedAvg ( const AreaBuf<const T> &other1, const AreaBuf<const T> &other2, const ClpRng& clpRng, const int8_t gbiIdx); void addWeightedAvg ( const AreaBuf<const T> &other1, const AreaBuf<const T> &other2, const ClpRng& clpRng, const int8_t gbiIdx);
void removeWeightHighFreq ( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng, const int8_t iGbiWeight); void removeWeightHighFreq ( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng, const int8_t iGbiWeight);
#endif
void addAvg ( const AreaBuf<const T> &other1, const AreaBuf<const T> &other2, const ClpRng& clpRng ); void addAvg ( const AreaBuf<const T> &other1, const AreaBuf<const T> &other2, const ClpRng& clpRng );
void removeHighFreq ( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng); void removeHighFreq ( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng);
void updateHistogram ( std::vector<int32_t>& hist ) const; void updateHistogram ( std::vector<int32_t>& hist ) const;
...@@ -400,7 +398,6 @@ void AreaBuf<T>::toLast( const ClpRng& clpRng ) ...@@ -400,7 +398,6 @@ void AreaBuf<T>::toLast( const ClpRng& clpRng )
template<> template<>
void AreaBuf<Pel>::toLast( const ClpRng& clpRng ); void AreaBuf<Pel>::toLast( const ClpRng& clpRng );
#if JVET_L0646_GBI
template<typename T> template<typename T>
void AreaBuf<T>::removeWeightHighFreq(const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng, const int8_t gbiWeight) void AreaBuf<T>::removeWeightHighFreq(const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng, const int8_t gbiWeight)
{ {
...@@ -452,7 +449,6 @@ void AreaBuf<T>::removeWeightHighFreq(const AreaBuf<T>& other, const bool bClip, ...@@ -452,7 +449,6 @@ void AreaBuf<T>::removeWeightHighFreq(const AreaBuf<T>& other, const bool bClip,
} }
#endif #endif
} }
#endif
template<typename T> template<typename T>
void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng ) void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, const ClpRng& clpRng )
...@@ -463,7 +459,7 @@ void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, cons ...@@ -463,7 +459,7 @@ void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, cons
T* dst = buf; T* dst = buf;
const int dstStride = stride; const int dstStride = stride;
#if ENABLE_SIMD_OPT_GBI && JVET_L0646_GBI #if ENABLE_SIMD_OPT_GBI
if (!bClip) if (!bClip)
{ {
if(!(width & 7)) if(!(width & 7))
...@@ -497,7 +493,7 @@ void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, cons ...@@ -497,7 +493,7 @@ void AreaBuf<T>::removeHighFreq( const AreaBuf<T>& other, const bool bClip, cons
#undef REM_HF_OP #undef REM_HF_OP
#undef REM_HF_OP_CLIP #undef REM_HF_OP_CLIP
#if ENABLE_SIMD_OPT_GBI && JVET_L0646_GBI #if ENABLE_SIMD_OPT_GBI
} }
#endif #endif
} }
...@@ -663,16 +659,12 @@ struct UnitBuf ...@@ -663,16 +659,12 @@ struct UnitBuf
void reconstruct ( const UnitBuf<const T> &pred, const UnitBuf<const T> &resi, const ClpRngs& clpRngs ); void reconstruct ( const UnitBuf<const T> &pred, const UnitBuf<const T> &resi, const ClpRngs& clpRngs );
void copyClip ( const UnitBuf<const T> &src, const ClpRngs& clpRngs ); void copyClip ( const UnitBuf<const T> &src, const ClpRngs& clpRngs );
void subtract ( const UnitBuf<const T> &other ); void subtract ( const UnitBuf<const T> &other );
#if JVET_L0646_GBI
void addWeightedAvg ( const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const uint8_t gbiIdx = GBI_DEFAULT, const bool chromaOnly = false, const bool lumaOnly = false); void addWeightedAvg ( const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const uint8_t gbiIdx = GBI_DEFAULT, const bool chromaOnly = false, const bool lumaOnly = false);
#endif
void addAvg ( const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const bool chromaOnly = false, const bool lumaOnly = false); void addAvg ( const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const bool chromaOnly = false, const bool lumaOnly = false);
void extendSingleBorderPel(); void extendSingleBorderPel();
void extendBorderPel ( unsigned margin ); void extendBorderPel ( unsigned margin );
void removeHighFreq ( const UnitBuf<T>& other, const bool bClip, const ClpRngs& clpRngs void removeHighFreq ( const UnitBuf<T>& other, const bool bClip, const ClpRngs& clpRngs
#if JVET_L0646_GBI
, const int8_t gbiWeight = g_GbiWeights[GBI_DEFAULT] , const int8_t gbiWeight = g_GbiWeights[GBI_DEFAULT]
#endif
); );
UnitBuf< T> subBuf (const UnitArea& subArea); UnitBuf< T> subBuf (const UnitArea& subArea);
...@@ -742,7 +734,6 @@ void UnitBuf<T>::reconstruct(const UnitBuf<const T> &pred, const UnitBuf<const T ...@@ -742,7 +734,6 @@ void UnitBuf<T>::reconstruct(const UnitBuf<const T> &pred, const UnitBuf<const T
} }
} }
#if JVET_L0646_GBI
template<typename T> template<typename T>
void UnitBuf<T>::addWeightedAvg(const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const uint8_t gbiIdx /* = GBI_DEFAULT */, const bool chromaOnly /* = false */, const bool lumaOnly /* = false */) void UnitBuf<T>::addWeightedAvg(const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const uint8_t gbiIdx /* = GBI_DEFAULT */, const bool chromaOnly /* = false */, const bool lumaOnly /* = false */)
{ {
...@@ -756,7 +747,6 @@ void UnitBuf<T>::addWeightedAvg(const UnitBuf<const T> &other1, const UnitBuf<co ...@@ -756,7 +747,6 @@ void UnitBuf<T>::addWeightedAvg(const UnitBuf<const T> &other1, const UnitBuf<co
bufs[i].addWeightedAvg(other1.bufs[i], other2.bufs[i], clpRngs.comp[i], gbiIdx); bufs[i].addWeightedAvg(other1.bufs[i], other2.bufs[i], clpRngs.comp[i], gbiIdx);
} }
} }
#endif
template<typename T> template<typename T>
void UnitBuf<T>::addAvg(const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const bool chromaOnly /* = false */, const bool lumaOnly /* = false */) void UnitBuf<T>::addAvg(const UnitBuf<const T> &other1, const UnitBuf<const T> &other2, const ClpRngs& clpRngs, const bool chromaOnly /* = false */, const bool lumaOnly /* = false */)
...@@ -792,24 +782,15 @@ void UnitBuf<T>::extendBorderPel( unsigned margin ) ...@@ -792,24 +782,15 @@ void UnitBuf<T>::extendBorderPel( unsigned margin )
template<typename T> template<typename T>
void UnitBuf<T>::removeHighFreq( const UnitBuf<T>& other, const bool bClip, const ClpRngs& clpRngs void UnitBuf<T>::removeHighFreq( const UnitBuf<T>& other, const bool bClip, const ClpRngs& clpRngs
#if JVET_L0646_GBI
, const int8_t gbiWeight , const int8_t gbiWeight
#endif
) )
{ {
#if JVET_L0646_GBI
if(gbiWeight != g_GbiWeights[GBI_DEFAULT]) if(gbiWeight != g_GbiWeights[GBI_DEFAULT])
{ {
bufs[0].removeWeightHighFreq(other.bufs[0], bClip, clpRngs.comp[0], gbiWeight); bufs[0].removeWeightHighFreq(other.bufs[0], bClip, clpRngs.comp[0], gbiWeight);
return; return;
} }
bufs[0].removeHighFreq(other.bufs[0], bClip, clpRngs.comp[0]); bufs[0].removeHighFreq(other.bufs[0], bClip, clpRngs.comp[0]);
#else
for (unsigned i = 0; i <bufs.size(); i++)
{
bufs[i].removeHighFreq(other.bufs[i], bClip, clpRngs.comp[i]);
}
#endif
} }
......
...@@ -98,9 +98,7 @@ enum CodingStatisticsType ...@@ -98,9 +98,7 @@ enum CodingStatisticsType
STATS__CABAC_BITS__OTHER, STATS__CABAC_BITS__OTHER,
STATS__CABAC_BITS__INVALID, STATS__CABAC_BITS__INVALID,
STATS__CABAC_BITS__IMV_FLAG, STATS__CABAC_BITS__IMV_FLAG,
#if JVET_L0646_GBI
STATS__CABAC_BITS__GBI_IDX, STATS__CABAC_BITS__GBI_IDX,
#endif
STATS__CABAC_BITS__EMT_CU_FLAG, STATS__CABAC_BITS__EMT_CU_FLAG,
STATS__CABAC_BITS__EMT_TU_INDEX, STATS__CABAC_BITS__EMT_TU_INDEX,
STATS__CABAC_BITS__MH_INTRA_FLAG, STATS__CABAC_BITS__MH_INTRA_FLAG,
...@@ -179,9 +177,7 @@ static inline const char* getName(CodingStatisticsType name) ...@@ -179,9 +177,7 @@ static inline const char* getName(CodingStatisticsType name)
"CABAC_BITS__OTHER", "CABAC_BITS__OTHER",
"CABAC_BITS__INVALID", "CABAC_BITS__INVALID",
"CABAC_BITS__IMV_FLAG", "CABAC_BITS__IMV_FLAG",
#if JVET_L0646_GBI
"CABAC_BITS__GBI_IDX", "CABAC_BITS__GBI_IDX",
#endif
"CABAC_BITS__EMT_CU_FLAG", "CABAC_BITS__EMT_CU_FLAG",
"CABAC_BITS__EMT_TU_INDX", "CABAC_BITS__EMT_TU_INDX",
"CABAC_BITS__MH_INTRA_FLAG", "CABAC_BITS__MH_INTRA_FLAG",
......
...@@ -309,11 +309,9 @@ static const int MAX_NUM_GT2_BINS_2x2SUBBLOCK = 2; ///< max ...@@ -309,11 +309,9 @@ static const int MAX_NUM_GT2_BINS_2x2SUBBLOCK = 2; ///< max
static const int BIO_EXTEND_SIZE = 1; static const int BIO_EXTEND_SIZE = 1;
static const int BIO_TEMP_BUFFER_SIZE = (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE) * (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE); static const int BIO_TEMP_BUFFER_SIZE = (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE) * (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE);
#if JVET_L0646_GBI
static const int GBI_NUM = 5; ///< the number of weight options static const int GBI_NUM = 5; ///< the number of weight options
static const int GBI_DEFAULT = ((uint8_t)(GBI_NUM >> 1)); ///< Default weighting index representing for w=0.5 static const int GBI_DEFAULT = ((uint8_t)(GBI_NUM >> 1)); ///< Default weighting index representing for w=0.5
static const int GBI_SIZE_CONSTRAINT = 256; ///< disabling GBi if cu size is smaller than 256 static const int GBI_SIZE_CONSTRAINT = 256; ///< disabling GBi if cu size is smaller than 256
#endif
static const int MAX_NUM_HMVP_CANDS = 6; ///< maximum number of HMVP candidates to be stored and used in merge list static const int MAX_NUM_HMVP_CANDS = 6; ///< maximum number of HMVP candidates to be stored and used in merge list
static const int MAX_NUM_HMVP_AVMPCANDS = 4; ///< maximum number of HMVP candidates to be used in AMVP list static const int MAX_NUM_HMVP_AVMPCANDS = 4; ///< maximum number of HMVP candidates to be used in AMVP list
......
...@@ -348,9 +348,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx ) ...@@ -348,9 +348,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx )
pu.bv.changePrecision(MV_PRECISION_INTERNAL, MV_PRECISION_INT); // used for only integer resolution pu.bv.changePrecision(MV_PRECISION_INTERNAL, MV_PRECISION_INT); // used for only integer resolution
} }
#endif #endif
#if JVET_L0646_GBI
pu.cu->GBiIdx = ( interDirNeighbours[candIdx] == 3 ) ? GBiIdx[candIdx] : GBI_DEFAULT; pu.cu->GBiIdx = ( interDirNeighbours[candIdx] == 3 ) ? GBiIdx[candIdx] : GBI_DEFAULT;
#endif
} }
void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx) void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx)
...@@ -492,7 +490,5 @@ void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx) ...@@ -492,7 +490,5 @@ void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx)
pu.mvpNum[REF_PIC_LIST_0] = NOT_VALID; pu.mvpNum[REF_PIC_LIST_0] = NOT_VALID;
pu.mvpNum[REF_PIC_LIST_1] = NOT_VALID; pu.mvpNum[REF_PIC_LIST_1] = NOT_VALID;
#if JVET_L0646_GBI
pu.cu->GBiIdx = (interDirNeighbours[fPosBaseIdx] == 3) ? GBiIdx[fPosBaseIdx] : GBI_DEFAULT; pu.cu->GBiIdx = (interDirNeighbours[fPosBaseIdx] == 3) ? GBiIdx[fPosBaseIdx] : GBI_DEFAULT;
#endif
} }
...@@ -261,9 +261,7 @@ public: ...@@ -261,9 +261,7 @@ public:
~MergeCtx() {} ~MergeCtx() {}
public: public:
MvField mvFieldNeighbours [ MRG_MAX_NUM_CANDS << 1 ]; // double length for mv of both lists MvField mvFieldNeighbours [ MRG_MAX_NUM_CANDS << 1 ]; // double length for mv of both lists
#if JVET_L0646_GBI
uint8_t GBiIdx [ MRG_MAX_NUM_CANDS ]; uint8_t GBiIdx [ MRG_MAX_NUM_CANDS ];
#endif
unsigned char interDirNeighbours[ MRG_MAX_NUM_CANDS ]; unsigned char interDirNeighbours[ MRG_MAX_NUM_CANDS ];
MergeType mrgTypeNeighbours [ MRG_MAX_NUM_CANDS ]; MergeType mrgTypeNeighbours [ MRG_MAX_NUM_CANDS ];
int numValidMergeCand; int numValidMergeCand;
...@@ -286,9 +284,7 @@ public: ...@@ -286,9 +284,7 @@ public:
MvField mvFieldNeighbours[AFFINE_MRG_MAX_NUM_CANDS << 1][3]; // double length for mv of both lists MvField mvFieldNeighbours[AFFINE_MRG_MAX_NUM_CANDS << 1][3]; // double length for mv of both lists
unsigned char interDirNeighbours[AFFINE_MRG_MAX_NUM_CANDS]; unsigned char interDirNeighbours[AFFINE_MRG_MAX_NUM_CANDS];
EAffineModel affineType[AFFINE_MRG_MAX_NUM_CANDS]; EAffineModel affineType[AFFINE_MRG_MAX_NUM_CANDS];
#if JVET_L0646_GBI
uint8_t GBiIdx[AFFINE_MRG_MAX_NUM_CANDS]; uint8_t GBiIdx[AFFINE_MRG_MAX_NUM_CANDS];
#endif
int numValidMergeCand; int numValidMergeCand;
int maxNumMergeCand; int maxNumMergeCand;
......
...@@ -505,7 +505,6 @@ const CtxSet ContextSetCfg::AffMergeIdx = ContextSetCfg::addCtxSet ...@@ -505,7 +505,6 @@ const CtxSet ContextSetCfg::AffMergeIdx = ContextSetCfg::addCtxSet
} ); } );
#endif #endif
#if JVET_L0646_GBI
const CtxSet ContextSetCfg::GBiIdx = ContextSetCfg::addCtxSet const CtxSet ContextSetCfg::GBiIdx = ContextSetCfg::addCtxSet
({ ({
// 4 ctx for 1st bin; 1 ctx for each of rest bins // 4 ctx for 1st bin; 1 ctx for each of rest bins
...@@ -519,7 +518,6 @@ const CtxSet ContextSetCfg::GBiIdx = ContextSetCfg::addCtxSet ...@@ -519,7 +518,6 @@ const CtxSet ContextSetCfg::GBiIdx = ContextSetCfg::addCtxSet
{ CNU, CNU, CNU, CNU, CNU, CNU, CNU, }, { CNU, CNU, CNU, CNU, CNU, CNU, CNU, },
#endif #endif
}); });
#endif
const CtxSet ContextSetCfg::Mvd = ContextSetCfg::addCtxSet const CtxSet ContextSetCfg::Mvd = ContextSetCfg::addCtxSet
({ ({
......
...@@ -198,9 +198,7 @@ public: ...@@ -198,9 +198,7 @@ public:
static const CtxSet ChromaQpAdjFlag; static const CtxSet ChromaQpAdjFlag;
static const CtxSet ChromaQpAdjIdc; static const CtxSet ChromaQpAdjIdc;
static const CtxSet ImvFlag; static const CtxSet ImvFlag;
#if JVET_L0646_GBI
static const CtxSet GBiIdx; static const CtxSet GBiIdx;
#endif
static const CtxSet ctbAlfFlag; static const CtxSet ctbAlfFlag;
static const CtxSet MHIntraFlag; static const CtxSet MHIntraFlag;
static const CtxSet MHIntraPredMode; static const CtxSet MHIntraPredMode;
......
...@@ -487,12 +487,10 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) ...@@ -487,12 +487,10 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
} }
} }
#if JVET_L0646_GBI
if (pu.cu->cs->sps->getSpsNext().getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT) if (pu.cu->cs->sps->getSpsNext().getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT)
{ {
bioApplied = false; bioApplied = false;
} }
#endif
} }
for (uint32_t refList = 0; refList < NUM_REF_PIC_LIST_01; refList++) for (uint32_t refList = 0; refList < NUM_REF_PIC_LIST_01; refList++)
...@@ -1202,14 +1200,12 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB ...@@ -1202,14 +1200,12 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB
if( iRefIdx0 >= 0 && iRefIdx1 >= 0 ) if( iRefIdx0 >= 0 && iRefIdx1 >= 0 )
{ {
#if JVET_L0646_GBI
if( pu.cu->GBiIdx != GBI_DEFAULT ) if( pu.cu->GBiIdx != GBI_DEFAULT )
{ {
CHECK(bioApplied, "GBi is disallowed with BIO"); CHECK(bioApplied, "GBi is disallowed with BIO");
pcYuvDst.addWeightedAvg(pcYuvSrc0, pcYuvSrc1, clpRngs, pu.cu->GBiIdx); pcYuvDst.addWeightedAvg(pcYuvSrc0, pcYuvSrc1, clpRngs, pu.cu->GBiIdx);
return; return;
} }
#endif
if (bioApplied) if (bioApplied)
{ {
const int src0Stride = pu.lwidth() + 2 * BIO_EXTEND_SIZE + 2; const int src0Stride = pu.lwidth() + 2 * BIO_EXTEND_SIZE + 2;
......
...@@ -143,7 +143,6 @@ struct MotionInfo ...@@ -143,7 +143,6 @@ struct MotionInfo
} }
}; };
#if JVET_L0646_GBI
class GBiMotionParam class GBiMotionParam
{ {
bool m_readOnly[2][33]; // 2 RefLists, 33 RefFrams bool m_readOnly[2][33]; // 2 RefLists, 33 RefFrams
...@@ -210,7 +209,6 @@ public: ...@@ -210,7 +209,6 @@ public:
ruiDist = m_distAffine[bP4][uiRefList][uiRefIdx]; ruiDist = m_distAffine[bP4][uiRefList][uiRefIdx];
} }
}; };
#endif
struct LutMotionCand struct LutMotionCand
{ {
MotionInfo* motionCand; MotionInfo* motionCand;
......
...@@ -244,7 +244,6 @@ int g_aiLMDivTableHigh[] = { ...@@ -244,7 +244,6 @@ int g_aiLMDivTableHigh[] = {
134, 134, 134, 133, 133, 133, 132, 132, 132, 132, 131, 131, 131, 131, 130, 130, 130, 130, 134, 134, 134, 133, 133, 133, 132, 132, 132, 132, 131, 131, 131, 131, 130, 130, 130, 130,
129, 129, 129, 129, 128, 128, 128, 128, 129, 129, 129, 129, 128, 128, 128, 128,
}; };
#if JVET_L0646_GBI
const int8_t g_GbiLog2WeightBase = 3; const int8_t g_GbiLog2WeightBase = 3;
const int8_t g_GbiWeightBase = (1 << g_GbiLog2WeightBase); const int8_t g_GbiWeightBase = (1 << g_GbiLog2WeightBase);
const int8_t g_GbiWeights[GBI_NUM] = { -2, 3, 4, 5, 10 }; const int8_t g_GbiWeights[GBI_NUM] = { -2, 3, 4, 5, 10 };
...@@ -308,7 +307,6 @@ uint32_t deriveWeightIdxBits(uint8_t gbiIdx) // Note: align this with TEncSbac:: ...@@ -308,7 +307,6 @@ uint32_t deriveWeightIdxBits(uint8_t gbiIdx) // Note: align this with TEncSbac::
} }
return numBits; return numBits;
} }
#endif
// initialize ROM variables // initialize ROM variables
void initROM() void initROM()
......
...@@ -215,7 +215,6 @@ extern int g_aiLMDivTableHigh[]; ...@@ -215,7 +215,6 @@ extern int g_aiLMDivTableHigh[];
extern const int g_aiNonLMPosThrs[]; extern const int g_aiNonLMPosThrs[];
#if JVET_L0646_GBI
extern const int8_t g_GbiLog2WeightBase; extern const int8_t g_GbiLog2WeightBase;
extern const int8_t g_GbiWeightBase; extern const int8_t g_GbiWeightBase;
extern const int8_t g_GbiWeights[GBI_NUM]; extern const int8_t g_GbiWeights[GBI_NUM];
...@@ -227,7 +226,6 @@ class CodingStructure; ...@@ -227,7 +226,6 @@ class CodingStructure;
int8_t getGbiWeight(uint8_t gbiIdx, uint8_t uhRefFrmList); int8_t getGbiWeight(uint8_t gbiIdx, uint8_t uhRefFrmList);
void resetGbiCodingOrder(bool bRunDecoding, const CodingStructure &cs); void resetGbiCodingOrder(bool bRunDecoding, const CodingStructure &cs);
uint32_t deriveWeightIdxBits(uint8_t gbiIdx); uint32_t deriveWeightIdxBits(uint8_t gbiIdx);
#endif
constexpr uint8_t g_tbMax[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, constexpr uint8_t g_tbMax[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
......
...@@ -808,9 +808,7 @@ private: ...@@ -808,9 +808,7 @@ private:
bool m_InterEMT; // 19 bool m_InterEMT; // 19
bool m_Affine; bool m_Affine;
bool m_AffineType; bool m_AffineType;
#if JVET_L0646_GBI
bool m_GBi; // bool m_GBi; //
#endif
bool m_MTTEnabled; // bool m_MTTEnabled; //
bool m_MHIntra; bool m_MHIntra;
bool m_Triangle; bool m_Triangle;
...@@ -896,10 +894,8 @@ public: ...@@ -896,10 +894,8 @@ public:
bool getUseIntraEMT () const { return m_IntraEMT; } bool getUseIntraEMT () const { return m_IntraEMT; }
void setUseInterEMT ( bool b ) { m_InterEMT = b; } void setUseInterEMT ( bool b ) { m_InterEMT = b; }
bool getUseInterEMT () const { return m_InterEMT; } bool getUseInterEMT () const { return m_InterEMT; }
#if JVET_L0646_GBI
void setUseGBi ( bool b ) { m_GBi = b; } void setUseGBi ( bool b ) { m_GBi = b; }
bool getUseGBi () const { return m_GBi; } bool getUseGBi () const { return m_GBi; }
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
void setLadfEnabled ( bool b ) { m_LadfEnabled = b; } void setLadfEnabled ( bool b ) { m_LadfEnabled = b; }
bool getLadfEnabled () const { return m_LadfEnabled; } bool getLadfEnabled () const { return m_LadfEnabled; }
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
#define JVET_L0646_GBI 1 // Generalized bi-prediction (GBi)
#define JVET_L0628_4TAP_INTRA 1 // 4-tap intra-interpolation filtering with switching between Gaussian and DCT-IF filters for luma component #define JVET_L0628_4TAP_INTRA 1 // 4-tap intra-interpolation filtering with switching between Gaussian and DCT-IF filters for luma component
...@@ -261,7 +260,7 @@ ...@@ -261,7 +260,7 @@
#define ENABLE_SIMD_OPT_DIST ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for the distortion calculations(SAD,SSE,HADAMARD), no impact on RD performance #define ENABLE_SIMD_OPT_DIST ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for the distortion calculations(SAD,SSE,HADAMARD), no impact on RD performance
#define ENABLE_SIMD_OPT_AFFINE_ME ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for affine ME, no impact on RD performance #define ENABLE_SIMD_OPT_AFFINE_ME ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for affine ME, no impact on RD performance
#define ENABLE_SIMD_OPT_ALF ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for ALF #define ENABLE_SIMD_OPT_ALF ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for ALF
#if ENABLE_SIMD_OPT_BUFFER && JVET_L0646_GBI #if ENABLE_SIMD_OPT_BUFFER
#define ENABLE_SIMD_OPT_GBI 1 ///< SIMD optimization for GBi #define ENABLE_SIMD_OPT_GBI 1 ///< SIMD optimization for GBi
#endif #endif
#define ENABLE_SIMD_OPT_BIO ( JVET_L0256_BIO && ENABLE_SIMD_OPT ) ///< SIMD optimization for BIO #define ENABLE_SIMD_OPT_BIO ( JVET_L0256_BIO && ENABLE_SIMD_OPT ) ///< SIMD optimization for BIO
......
...@@ -267,11 +267,9 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other ) ...@@ -267,11 +267,9 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
#endif #endif
imv = other.imv; imv = other.imv;
imvNumCand = other.imvNumCand; imvNumCand = other.imvNumCand;
#if JVET_L0646_GBI
GBiIdx = other.GBiIdx; GBiIdx = other.GBiIdx;
for (int i = 0; i<2; i++) for (int i = 0; i<2; i++)
refIdxBi[i] = other.refIdxBi[i]; refIdxBi[i] = other.refIdxBi[i];
#endif
#if JVET_L0293_CPR #if JVET_L0293_CPR
cpr = other.cpr; cpr = other.cpr;
#endif #endif
...@@ -302,11 +300,9 @@ void CodingUnit::initData() ...@@ -302,11 +300,9 @@ void CodingUnit::initData()
#endif #endif
imv = 0; imv = 0;
imvNumCand = 0; imvNumCand = 0;
#if JVET_L0646_GBI
GBiIdx = GBI_DEFAULT; GBiIdx = GBI_DEFAULT;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
refIdxBi[i] = -1; refIdxBi[i] = -1;
#endif
#if JVET_L0293_CPR #if JVET_L0293_CPR
cpr = false; cpr = false;
#endif #endif
......
...@@ -306,10 +306,8 @@ struct CodingUnit : public UnitArea ...@@ -306,10 +306,8 @@ struct CodingUnit : public UnitArea
uint32_t tileIdx; uint32_t tileIdx;
#endif #endif
uint8_t emtFlag; uint8_t emtFlag;
#if JVET_L0646_GBI
uint8_t GBiIdx; uint8_t GBiIdx;
int refIdxBi[2]; int refIdxBi[2];
#endif
// needed for fast imv mode decisions // needed for fast imv mode decisions
int8_t imvNumCand; int8_t imvNumCand;
#if JVET_L0293_CPR #if JVET_L0293_CPR
......
...@@ -800,9 +800,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, ...@@ -800,9 +800,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
#if !JVET_L0090_PAIR_AVG #if !JVET_L0090_PAIR_AVG
isCandInter[ui] = false; isCandInter[ui] = false;
#endif #endif
#if JVET_L0646_GBI
mrgCtx.GBiIdx[ui] = GBI_DEFAULT; mrgCtx.GBiIdx[ui] = GBI_DEFAULT;
#endif
mrgCtx.interDirNeighbours[ui] = 0; mrgCtx.interDirNeighbours[ui] = 0;
mrgCtx.mrgTypeNeighbours [ui] = MRG_TYPE_DEFAULT_N; mrgCtx.mrgTypeNeighbours [ui] = MRG_TYPE_DEFAULT_N;