Commit 84a6aa20 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0256_BIO

parent 095aed43
......@@ -225,9 +225,7 @@ void EncApp::xInitLibCfg()
#endif
m_cEncLib.setAffine ( m_Affine );
m_cEncLib.setAffineType ( m_AffineType );
#if JVET_L0256_BIO
m_cEncLib.setBIO (m_BIO);
#endif
m_cEncLib.setDisableMotionCompression ( m_DisableMotionCompression );
m_cEncLib.setMTTMode ( m_MTT );
m_cEncLib.setUseLMChroma ( m_LMChroma );
......
......@@ -820,9 +820,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
#endif
("Affine", m_Affine, false, "Enable affine prediction (0:off, 1:on) [default: off]")
("AffineType", m_AffineType, true, "Enable affine type prediction (0:off, 1:on) [default: on]" )
#if JVET_L0256_BIO
("BIO", m_BIO, false, "Enable bi-directional optical flow")
#endif
("DisableMotCompression", m_DisableMotionCompression, false, "Disable motion data compression for all modes")
("IMV", m_ImvMode, 2, "Adaptive MV precision Mode (IMV)\n"
"\t0: disabled IMV\n"
......@@ -1929,9 +1927,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_LMChroma, "LMChroma only allowed with NEXT profile" );
xConfirmPara( m_LargeCTU, "Large CTU is only allowed with NEXT profile" );
xConfirmPara( m_SubPuMvpMode != 0, "Sub-PU motion vector prediction is only allowed with NEXT profile" );
#if JVET_L0256_BIO
xConfirmPara( m_BIO, "BIO only allowed with NEXT profile" );
#endif
xConfirmPara( m_DisableMotionCompression, "Disable motion data compression only allowed with NEXT profile" );
xConfirmPara( m_MTT, "Multi type tree is only allowed with NEXT profile" );
xConfirmPara( m_ImvMode, "IMV is only allowed with NEXT profile" );
......@@ -3124,9 +3120,7 @@ void EncAppCfg::xPrintParameter()
msg( VERBOSE, "DualITree:%d ", m_dualTree );
msg( VERBOSE, "LargeCTU:%d ", m_LargeCTU );
msg( VERBOSE, "IMV:%d ", m_ImvMode );
#if JVET_L0256_BIO
msg( VERBOSE, "BIO:%d ", m_BIO );
#endif
msg( VERBOSE, "DisMDC:%d ", m_DisableMotionCompression );
msg( VERBOSE, "MTT:%d ", m_MTT );
#if ENABLE_WPP_PARALLELISM
......
......@@ -212,9 +212,7 @@ protected:
#endif
bool m_Affine;
bool m_AffineType;
#if JVET_L0256_BIO
bool m_BIO;
#endif
bool m_DisableMotionCompression;
unsigned m_MTT;
#if ENABLE_WPP_PARALLELISM
......
......@@ -62,7 +62,6 @@ void addAvgCore( const T* src1, int src1Stride, const T* src2, int src2Stride, T
#undef ADD_AVG_CORE_INC
}
#if JVET_L0256_BIO
void addBIOAvgCore(const Pel* src0, int src0Stride, const Pel* src1, int src1Stride, Pel *dst, int dstStride, const Pel *gradX0, const Pel *gradX1, const Pel *gradY0, const Pel*gradY1, int gradStride, int width, int height, int tmpx, int tmpy, int shift, int offset, const ClpRng& clpRng)
{
int b = 0;
......@@ -192,7 +191,6 @@ void calcBlkGradientCore(int sx, int sy, int *arraysGx2, int *arraysGxGy
GydI += width;
}
}
#endif
#if ENABLE_SIMD_OPT_GBI && JVET_L0646_GBI
void removeWeightHighFreq(int16_t* dst, int dstStride, const int16_t* src, int srcStride, int width, int height, int shift, int gbiWeight)
......
......@@ -306,10 +306,8 @@ static const int MAX_NUM_GT2_BINS_4x4SUBBLOCK = 4; ///< max
static const int MAX_NUM_REG_BINS_2x2SUBBLOCK = 8; ///< max number of context-coded bins (incl. gt2 bins) per 2x2 subblock (chroma)
static const int MAX_NUM_GT2_BINS_2x2SUBBLOCK = 2; ///< max number of gt2 bins per 2x2 subblock (chroma)
#if JVET_L0256_BIO
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);
#endif
#if JVET_L0646_GBI
static const int GBI_NUM = 5; ///< the number of weight options
......@@ -387,9 +385,7 @@ static const int NTAPS_CHROMA = 4; ///< Numb
static const int MAX_LADF_INTERVALS = 5; /// max number of luma adaptive deblocking filter qp offset intervals
#endif
#if JVET_L0256_BIO
static const int NTAPS_BILINEAR = 2; ///< Number of taps for bilinear filter
#endif
#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP
......
This diff is collapsed.
......@@ -64,7 +64,6 @@ class InterPrediction : public WeightPrediction
{
private:
#if JVET_L0256_BIO
Distortion m_bioDistThres;
Distortion m_bioSubBlkDistThres;
Distortion m_bioPredSubBlkDist[MAX_NUM_PARTS_IN_CTU];
......@@ -74,7 +73,6 @@ private:
int m_dotProduct3[BIO_TEMP_BUFFER_SIZE];
int m_dotProduct5[BIO_TEMP_BUFFER_SIZE];
int m_dotProduct6[BIO_TEMP_BUFFER_SIZE];
#endif
protected:
InterpolationFilter m_if;
......@@ -94,7 +92,6 @@ protected:
PelStorage m_triangleBuf;
Mv* m_storedMv;
#if JVET_L0256_BIO
Pel* m_gradX0;
Pel* m_gradY0;
Pel* m_gradX1;
......@@ -105,35 +102,26 @@ protected:
void applyBiOptFlow(const PredictionUnit &pu, const CPelUnitBuf &yuvSrc0, const CPelUnitBuf &yuvSrc1, const int &refIdx0, const int &refIdx1, PelUnitBuf &yuvDst, const BitDepths &clipBitDepths);
bool xCalcBiPredSubBlkDist(const PredictionUnit &pu, const Pel* yuvSrc0, const int src0Stride, const Pel* yuvSrc1, const int src1Stride, const BitDepths &clipBitDepths);
void bioSampleExtendBilinearFilter(Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int dim, int fracX, int fracY, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng);
#endif
void xPredInterUni ( const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
#if JVET_L0256_BIO
, const bool& bioApplied
#endif
#if JVET_L0293_CPR
, const bool luma, const bool chroma
#endif
);
void xPredInterBi ( PredictionUnit& pu, PelUnitBuf &pcYuvPred );
void xPredInterBlk ( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv& _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng
#if JVET_L0256_BIO
, const bool& bioApplied
#endif
#if JVET_L0293_CPR
, bool isCPR
#endif
);
#if JVET_L0256_BIO
void xAddBIOAvg4 (const Pel* src0, int src0Stride, const Pel* src1, int src1Stride, Pel *dst, int dstStride, const Pel *gradX0, const Pel *gradX1, const Pel *gradY0, const Pel*gradY1, int gradStride, int width, int height, int tmpx, int tmpy, int shift, int offset, const ClpRng& clpRng);
void xBioGradFilter (Pel* pSrc, int srcStride, int width, int height, int gradStride, Pel* gradX, Pel* gradY);
void xCalcBIOPar (const Pel* srcY0Temp, const Pel* srcY1Temp, const Pel* gradX0, const Pel* gradX1, const Pel* gradY0, const Pel* gradY1, int* dotProductTemp1, int* dotProductTemp2, int* dotProductTemp3, int* dotProductTemp5, int* dotProductTemp6, const int src0Stride, const int src1Stride, const int gradStride, const int widthG, const int heightG);
void xCalcBlkGradient (int sx, int sy, int *arraysGx2, int *arraysGxGy, int *arraysGxdI, int *arraysGy2, int *arraysGydI, int &sGx2, int &sGy2, int &sGxGy, int &sGxdI, int &sGydI, int width, int height, int unitSize);
void xWeightedAverage ( const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs, const bool& bioApplied );
#else
void xWeightedAverage ( const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs );
#endif
void xPredAffineBlk( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv* _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng );
void xWeightedTriangleBlk ( const PredictionUnit &pu, const uint32_t width, const uint32_t height, const ComponentID compIdx, const bool splitDir, const bool weights, PelUnitBuf& predDst, PelUnitBuf& predSrc0, PelUnitBuf& predSrc1 );
......
......@@ -111,7 +111,6 @@ const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILT
{ 0, 2, 63, -1 },
};
#if JVET_L0256_BIO
const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR] =
{
{ 64, 0, },
......@@ -131,7 +130,6 @@ const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILT
{ 8, 56, },
{ 4, 60, },
};
#endif
// ====================================================================================================================
// Private member functions
......@@ -465,11 +463,7 @@ void InterpolationFilter::filterVer(const ClpRng& clpRng, Pel const *src, int sr
* \param fmt Chroma format
* \param bitDepth Bit depth
*/
#if JVET_L0256_BIO
void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx )
#else
void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng )
#endif
{
if( frac == 0 )
{
......@@ -478,13 +472,11 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i
else if( isLuma( compID ) )
{
CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
#if JVET_L0256_BIO
if( nFilterIdx == 1 )
{
filterHor<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_bilinearFilter[frac]);
}
else
#endif
{
filterHor<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac] );
}
......@@ -514,11 +506,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i
* \param fmt Chroma format
* \param bitDepth Bit depth
*/
#if JVET_L0256_BIO
void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx)
#else
void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng )
#endif
{
if( frac == 0 )
{
......@@ -527,13 +515,11 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i
else if( isLuma( compID ) )
{
CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
#if JVET_L0256_BIO
if (nFilterIdx == 1)
{
filterVer<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilter[frac]);
}
else
#endif
{
filterVer<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac] );
}
......
......@@ -56,9 +56,7 @@ class InterpolationFilter
{
static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA]; ///< Luma filter taps
static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps
#if JVET_L0256_BIO
static const TFilterCoeff m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR]; ///< bilinear filter taps
#endif
public:
template<bool isFirst, bool isLast>
static void filterCopy( const ClpRng& clpRng, const Pel *src, int srcStride, Pel *dst, int dstStride, int width, int height );
......@@ -90,13 +88,8 @@ public:
void _initInterpolationFilterX86();
#endif
#if JVET_L0256_BIO
void filterHor(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0);
void filterVer(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0);
#else
void filterHor(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng );
void filterVer(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng );
#endif
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
void cacheAssign( CacheModel *cache ) { m_cacheModel = cache; }
#endif
......
......@@ -164,9 +164,7 @@ void RdCost::init()
m_afpDistortFunc[DF_SSE16N_WTD] = RdCost::xGetSSE16N_WTD;
#endif
#if JVET_L0256_BIO
m_afpDistortFunc[DF_SAD_INTERMEDIATE_BITDEPTH] = RdCost::xGetSAD;
#endif
#if ENABLE_SIMD_OPT_DIST
#ifdef TARGET_SIMD_X86
......@@ -319,11 +317,7 @@ void RdCost::setDistParam( DistParam &rcDP, const CPelBuf &org, const CPelBuf &c
rcDP.maximumDistortionForEarlyExit = std::numeric_limits<Distortion>::max();
}
#if JVET_L0256_BIO
void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode, int step, bool useHadamard, bool bioApplied )
#else
void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode, int step, bool useHadamard )
#endif
{
rcDP.bitDepth = bitDepth;
rcDP.compID = compID;
......@@ -343,13 +337,11 @@ void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY,
CHECK( useHadamard || rcDP.useMR || subShiftMode > 0, "only used in xDirectMCCost with these default parameters (so far...)" );
#if JVET_L0256_BIO
if ( bioApplied )
{
rcDP.distFunc = m_afpDistortFunc[ DF_SAD_INTERMEDIATE_BITDEPTH ];
return;
}
#endif
if( width == 12 )
{
......
......@@ -156,11 +156,7 @@ public:
void setDistParam( DistParam &rcDP, const CPelBuf &org, const Pel* piRefY , int iRefStride, int bitDepth, ComponentID compID, int subShiftMode = 0, int step = 1, bool useHadamard = false );
void setDistParam( DistParam &rcDP, const CPelBuf &org, const CPelBuf &cur, int bitDepth, ComponentID compID, bool useHadamard = false );
#if JVET_L0256_BIO
void setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode = 0, int step = 1, bool useHadamard = false, bool bioApplied = false );
#else
void setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode = 0, int step = 1, bool useHadamard = false );
#endif
double getMotionLambda ( bool bIsTransquantBypass ) { return m_dLambdaMotionSAD[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING)?1:0]; }
void selectMotionLambda ( bool bIsTransquantBypass ) { m_motionLambda = getMotionLambda( bIsTransquantBypass ); }
......
......@@ -1765,9 +1765,7 @@ SPSNext::SPSNext( SPS& sps )
, m_LargeCTU ( false )
, m_SubPuMvp ( false )
, m_IMV ( false )
#if JVET_L0256_BIO
, m_BIO ( false )
#endif
, m_DisableMotionCompression ( false )
, m_LMChroma ( false )
, m_IntraEMT ( false )
......
......@@ -801,9 +801,7 @@ private:
bool m_LargeCTU; // 5
bool m_SubPuMvp;
bool m_IMV; // 9
#if JVET_L0256_BIO
bool m_BIO;
#endif
bool m_DisableMotionCompression; // 13
bool m_LMChroma; // 17
bool m_IntraEMT; // 18
......@@ -883,10 +881,8 @@ public:
bool getUseAffine () const { return m_Affine; }
void setUseAffineType ( bool b ) { m_AffineType = b; }
bool getUseAffineType () const { return m_AffineType; }
#if JVET_L0256_BIO
void setUseBIO(bool b) { m_BIO = b; }
bool getUseBIO() const { return m_BIO; }
#endif
void setDisableMotCompress ( bool b ) { m_DisableMotionCompression = b; }
bool getDisableMotCompress () const { return m_DisableMotionCompression; }
bool getMTTEnabled () const { return m_MTTEnabled; }
......
......@@ -79,7 +79,6 @@
#define JVET_L0256_BIO 1
#define JVET_L0646_GBI 1 // Generalized bi-prediction (GBi)
......@@ -547,13 +546,9 @@ enum DFunc
DF_DEFAULT_ORI = DF_SSE_WTD+8,
#endif
#if JVET_L0256_BIO
DF_SAD_INTERMEDIATE_BITDEPTH = 63,
DF_TOTAL_FUNCTIONS = 64
#else
DF_TOTAL_FUNCTIONS = 63
#endif
};
/// motion vector predictor direction used in AMVP
......
......@@ -791,9 +791,7 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
READ_FLAG( symbol, "large_ctu_flag" ); spsNext.setUseLargeCTU ( symbol != 0 );
READ_FLAG( symbol, "subpu_tmvp_flag" ); spsNext.setSubPuMvpMode (symbol);
READ_FLAG( symbol, "imv_enable_flag" ); spsNext.setUseIMV ( symbol != 0 );
#if JVET_L0256_BIO
READ_FLAG( symbol, "bio_enable_flag" ); spsNext.setUseBIO ( symbol != 0 );
#endif
READ_FLAG( symbol, "disable_motion_compression_flag" ); spsNext.setDisableMotCompress ( symbol != 0 );
READ_FLAG( symbol, "lm_chroma_enabled_flag" ); spsNext.setUseLMChroma ( symbol != 0 );
READ_FLAG( symbol, "emt_intra_enabled_flag" ); spsNext.setUseIntraEMT ( symbol != 0 );
......
......@@ -217,9 +217,7 @@ protected:
#endif
bool m_Affine;
bool m_AffineType;
#if JVET_L0256_BIO
bool m_BIO;
#endif
bool m_DisableMotionCompression;
unsigned m_MTTMode;
......@@ -705,10 +703,8 @@ public:
bool getAffine () const { return m_Affine; }
void setAffineType( bool b ) { m_AffineType = b; }
bool getAffineType() const { return m_AffineType; }
#if JVET_L0256_BIO
void setBIO(bool b) { m_BIO = b; }
bool getBIO() const { return m_BIO; }
#endif
void setDisableMotionCompression ( bool b ) { m_DisableMotionCompression = b; }
bool getDisableMotionCompression () const { return m_DisableMotionCompression; }
......
......@@ -868,9 +868,7 @@ void EncLib::xInitSPS(SPS &sps)
#endif
sps.getSpsNext().setImvMode ( ImvMode(m_ImvMode) );
sps.getSpsNext().setUseIMV ( m_ImvMode != IMV_OFF );
#if JVET_L0256_BIO
sps.getSpsNext().setUseBIO ( m_BIO );
#endif
sps.getSpsNext().setUseAffine ( m_Affine );
sps.getSpsNext().setUseAffineType ( m_AffineType );
sps.getSpsNext().setDisableMotCompress ( m_DisableMotionCompression );
......
......@@ -2313,9 +2313,7 @@ Distortion InterSearch::xGetTemplateCost( const PredictionUnit& pu,
xPredInterBlk( COMPONENT_Y, pu, picRef, cMvCand, predBuf, bi, pu.cu->slice->clpRng( COMPONENT_Y )
#if JVET_L0256_BIO
, false
#endif
#if JVET_L0293_CPR
, false
#endif
......
......@@ -531,9 +531,7 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM )
WRITE_FLAG( spsNext.getUseLargeCTU() ? 1 : 0, "large_ctu_flag" );
WRITE_FLAG(spsNext.getUseSubPuMvp() ? 1 : 0, "subpu_tmvp_flag");
WRITE_FLAG( spsNext.getUseIMV() ? 1 : 0, "imv_enable_flag" );
#if JVET_L0256_BIO
WRITE_FLAG( spsNext.getUseBIO() ? 1 : 0, "bio_enable_flag" );
#endif
WRITE_FLAG( spsNext.getDisableMotCompress() ? 1 : 0, "disable_motion_compression_flag" );
WRITE_FLAG( spsNext.getUseLMChroma() ? 1 : 0, "lm_chroma_enabled_flag" );
WRITE_FLAG( spsNext.getUseIntraEMT() ? 1 : 0, "emt_intra_enabled_flag" );
......
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