From 633288ce4afc4e002db2be5de200973d1b87f394 Mon Sep 17 00:00:00 2001 From: Frank Bossen <fbossen@gmail.com> Date: Wed, 22 Aug 2018 21:18:16 -0400 Subject: [PATCH] Apply bug fixes from BMS 2.0.1 --- source/Lib/CommonLib/IntraPrediction.cpp | 4 ++-- source/Lib/CommonLib/version.h | 2 +- source/Lib/EncoderLib/InterSearch.cpp | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp index db1837d0..8c7b71cb 100644 --- a/source/Lib/CommonLib/IntraPrediction.cpp +++ b/source/Lib/CommonLib/IntraPrediction.cpp @@ -710,8 +710,8 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch if (wT + wL == 0) break; int c = x + y + 1; - const Pel left = refSide[c + 1]; - const Pel top = refMain[c + 1]; + const Pel left = (wL != 0) ? refSide[c + 1] : 0; + const Pel top = (wT != 0) ? refMain[c + 1] : 0; pDsty[x] = ClipPel((wL * left + wT * top + (64 - wL - wT) * pDsty[x] + 32) >> 6, clpRng); } diff --git a/source/Lib/CommonLib/version.h b/source/Lib/CommonLib/version.h index 86d5a1c7..700d834e 100644 --- a/source/Lib/CommonLib/version.h +++ b/source/Lib/CommonLib/version.h @@ -1,3 +1,3 @@ #if ! defined( NEXT_SOFTWARE_VERSION ) -#define NEXT_SOFTWARE_VERSION "2.0" +#define NEXT_SOFTWARE_VERSION "2.0.1" #endif diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index 4eaf82d1..1b790b62 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -2673,7 +2673,11 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu, if ( m_pcEncCfg->getFastMEForGenBLowDelayEnabled() && iRefList == 1 ) // list 1 { +#if JVET_K0185_AFFINE_6PARA_ENC + if ( slice.getList1IdxToList0Idx( iRefIdxTemp ) >= 0 && (pu.cu->affineType != AFFINEMODEL_6PARAM || slice.getList1IdxToList0Idx( iRefIdxTemp ) == refIdx4Para[0]) ) +#else if ( slice.getList1IdxToList0Idx( iRefIdxTemp ) >= 0 ) +#endif { int iList1ToList0Idx = slice.getList1IdxToList0Idx( iRefIdxTemp ); ::memcpy( cMvTemp[1][iRefIdxTemp], cMvTemp[0][iList1ToList0Idx], sizeof(Mv)*3 ); @@ -3337,7 +3341,7 @@ void InterSearch::xAffineMotionEstimation( PredictionUnit& pu, #endif DTRACE( g_trace_ctx, D_COMMON, " (%d) yy uiBitsBest=%d\n", DTRACE_GET_COUNTER(g_trace_ctx,D_COMMON), uiBitsBest ); } - uiCostBest = (uint32_t)( floor( fWeight * (double)uiCostBest ) + (double)m_pcRdCost->getCost( uiBitsBest ) ); + uiCostBest = (Distortion)( floor( fWeight * (double)uiCostBest ) + (double)m_pcRdCost->getCost( uiBitsBest ) ); DTRACE( g_trace_ctx, D_COMMON, " (%d) uiBitsBest=%d, uiCostBest=%d\n", DTRACE_GET_COUNTER(g_trace_ctx,D_COMMON), uiBitsBest, uiCostBest ); @@ -3649,7 +3653,7 @@ void InterSearch::xAffineMotionEstimation( PredictionUnit& pu, #endif } - uiCostTemp = (uint32_t)( floor( fWeight * (double)uiCostTemp ) + (double)m_pcRdCost->getCost( uiBitsTemp ) ); + uiCostTemp = (Distortion)( floor( fWeight * (double)uiCostTemp ) + (double)m_pcRdCost->getCost( uiBitsTemp ) ); // store best cost and mv if ( uiCostTemp < uiCostBest ) -- GitLab