[x265] [PATCH] tcomrom: move ADI intraModeNumFast table to estIntraPredQT(), no need for global variable

gopu at multicorewareinc.com gopu at multicorewareinc.com
Fri Feb 21 00:53:21 CET 2014


# HG changeset patch
# User Gopu Govindaswamy
# Date 1392940392 28800
#      Thu Feb 20 15:53:12 2014 -0800
# Node ID e4afe6f86144dfd24c3a14a518df5275010b5e14
# Parent  34886273d14b41d777a9129fc3657aef34d2c986
tcomrom: move ADI intraModeNumFast table to estIntraPredQT(), no need for global variable

diff -r 34886273d14b -r e4afe6f86144 source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp	Thu Feb 20 10:35:39 2014 -0800
+++ b/source/Lib/TLibCommon/TComRom.cpp	Thu Feb 20 15:53:12 2014 -0800
@@ -425,21 +425,6 @@
 };
 
 // ====================================================================================================================
-// ADI
-// ====================================================================================================================
-
-const UChar g_intraModeNumFast[7] =
-{
-    3, //   2x2
-    8, //   4x4
-    8, //   8x8
-    3, //  16x16
-    3, //  32x32
-    3, //  64x64
-    3 // 128x128
-};
-
-// ====================================================================================================================
 // Misc.
 // ====================================================================================================================
 
diff -r 34886273d14b -r e4afe6f86144 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Feb 20 10:35:39 2014 -0800
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Feb 20 15:53:12 2014 -0800
@@ -1787,6 +1787,7 @@
     uint32_t overallDistC = 0;
     uint32_t candNum;
     uint64_t candCostList[FAST_UDI_MAX_RDMODE_NUM];
+    const UChar intraModeNumFast[7] = {3, 8, 8, 3, 3, 3, 3}; // 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128
 
     //===== set QP and clear Cbf =====
     if (cu->getSlice()->getPPS()->getUseDQP() == true)
@@ -1810,7 +1811,7 @@
         Pel* fenc   = fencYuv->getLumaAddr(pu, width);
         uint32_t stride = predYuv->getStride();
         uint32_t rdModeList[FAST_UDI_MAX_RDMODE_NUM];
-        int numModesForFullRD = g_intraModeNumFast[widthBit];
+        int numModesForFullRD = intraModeNumFast[widthBit];
 
         bool doFastSearch = (numModesForFullRD != numModesAvailable);
         if (doFastSearch)


More information about the x265-devel mailing list