From dc8b04e54fdcfd1f2a6c0568c0055065f3ff7228 Mon Sep 17 00:00:00 2001 From: Frank Bossen <fbossen@gmail.com> Date: Thu, 31 Jan 2019 06:47:32 -0500 Subject: [PATCH] JVET-M0238: Nearest neighbor instead of linear interpolation in PDPC --- source/Lib/CommonLib/IntraPrediction.cpp | 4 ++++ source/Lib/CommonLib/TypeDef.h | 1 + 2 files changed, 5 insertions(+) diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp index e49e92ece..d48ef8511 100644 --- a/source/Lib/CommonLib/IntraPrediction.cpp +++ b/source/Lib/CommonLib/IntraPrediction.cpp @@ -770,7 +770,11 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch if (wL == 0) break; Pel *p = refSide + deltay; +#if JVET_M0238_PDPC_NO_INTERPOLATION + Pel left = p[deltaFrac0 >> 5]; +#else Pel left = (((64 - deltaFrac0) * p[0] + deltaFrac0 * p[1] + 32) >> 6); +#endif pDsty[x] = ClipPel((wL * left + (64 - wL) * pDsty[x] + 32) >> 6, clpRng); } } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index da70aafbf..21ba95091 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -117,6 +117,7 @@ typedef std::pair<int, int> TrCost; // clang-format off #define JVET_M0453_CABAC_ENGINE 1 #define JVET_M0512_MOTION_BUFFER_COMPRESSION 1 +#define JVET_M0238_PDPC_NO_INTERPOLATION 1 #define JVET_M0409_ATMVP_FIX 1 -- GitLab