From 6029bde1fe79753d4a680b6738d5809971e5ad2e Mon Sep 17 00:00:00 2001 From: Chia-Ming Tsai <chia-ming.tsai@mediatek.com> Date: Thu, 8 Aug 2019 13:49:25 +0800 Subject: [PATCH] Clean-up for the threshold table of intra interpolation filter selection --- source/Lib/CommonLib/IntraPrediction.cpp | 38 ++++++++---------------- source/Lib/CommonLib/IntraPrediction.h | 2 +- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp index 40840f4c..376dbb20 100644 --- a/source/Lib/CommonLib/IntraPrediction.cpp +++ b/source/Lib/CommonLib/IntraPrediction.cpp @@ -55,34 +55,22 @@ // Tables // ==================================================================================================================== -const uint8_t IntraPrediction::m_aucIntraFilter[MAX_NUM_CHANNEL_TYPE][MAX_INTRA_FILTER_DEPTHS] = +const uint8_t IntraPrediction::m_aucIntraFilter[MAX_INTRA_FILTER_DEPTHS] = { - { // Luma #if JVET_O0277_INTRA_SMALL_BLOCK_DCTIF - 24, // 1xn - 24, // 2xn - 24, // 4xn + 24, // 1xn + 24, // 2xn + 24, // 4xn #else - 20, // 1xn - 20, // 2xn - 20, // 4xn + 20, // 1xn + 20, // 2xn + 20, // 4xn #endif - 14, // 8xn - 2, // 16xn - 0, // 32xn - 0, // 64xn - 0, // 128xn - }, - { // Chroma - 40, // 1xn - 40, // 2xn - 40, // 4xn - 28, // 8xn - 4, // 16xn - 0, // 32xn - 0, // 64xn - 0, // 128xn - } + 14, // 8xn + 2, // 16xn + 0, // 32xn + 0, // 64xn + 0 // 128xn }; const TFilterCoeff g_intraGaussFilter[32][4] = { @@ -600,7 +588,7 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA #endif const int log2Size = ((g_aucLog2[puSize.width] + g_aucLog2[puSize.height]) >> 1); CHECK( log2Size >= MAX_INTRA_FILTER_DEPTHS, "Size not supported" ); - filterFlag = (diff > m_aucIntraFilter[chType][log2Size]); + filterFlag = (diff > m_aucIntraFilter[log2Size]); } // Selelection of either ([1 2 1] / 4 ) refrence filter OR Gaussian 4-tap interpolation filter diff --git a/source/Lib/CommonLib/IntraPrediction.h b/source/Lib/CommonLib/IntraPrediction.h index 29ccc472..97b82b5e 100644 --- a/source/Lib/CommonLib/IntraPrediction.h +++ b/source/Lib/CommonLib/IntraPrediction.h @@ -77,7 +77,7 @@ private: Pel* m_yuvExt2[MAX_NUM_COMPONENT][4]; int m_yuvExtSize2; - static const uint8_t m_aucIntraFilter[MAX_NUM_CHANNEL_TYPE][MAX_INTRA_FILTER_DEPTHS]; + static const uint8_t m_aucIntraFilter[MAX_INTRA_FILTER_DEPTHS]; struct IntraPredParam //parameters of Intra Prediction { -- GitLab