[x265] add static const for local tables

chen chenm003 at 163.com
Fri Feb 7 07:30:25 CET 2014


diff --git a/source/Lib/TLibCommon/TComDataCU.cpp b/source/Lib/TLibCommon/TComDataCU.cpp
index 8b2636c..452a464 100644
--- a/source/Lib/TLibCommon/TComDataCU.cpp
+++ b/source/Lib/TLibCommon/TComDataCU.cpp
@@ -2194,13 +2194,16 @@ void TComDataCU::getInterMergeCandidates(uint32_t absPartIdx, uint32_t puIdx, TC
     if (getSlice()->isInterB())
     {
         // TODO: TComRom??
-        uint32_t priorityList0[12] = { 0, 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3 };
-        uint32_t priorityList1[12] = { 1, 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2 };
+        uint32_t priorityList0 = 0xEDC984; // { 0, 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3 }
+        uint32_t priorityList1 = 0xB73621; // { 1, 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2 }
         for (int idx = 0; idx < cutoff * (cutoff - 1) && arrayAddr != getSlice()->getMaxNumMergeCand(); idx
         {
-            int i = priorityList0[idx];
-            int j = priorityList1[idx];
+            int i = priorityList0 & 3;
+            int j = priorityList1 & 3;
+            priorityList0 >>= 2;
+            priorityList1 >>= 2;
+
             if (abCandIsInter[i] && abCandIsInter[j] && (interDirNeighbours[i] & 0x1) && (interDirNeighbour
             {
                 abCandIsInter[arrayAddr] = true;

At 2014-02-07 08:44:02,"Satoshi Nakagawa" <nakagawa424 at oki.com> wrote:
># HG changeset patch
># User Satoshi Nakagawa <nakagawa424 at oki.com>
># Date 1391733642 -32400
>#      Fri Feb 07 09:40:42 2014 +0900
># Node ID 0564ff2d14d17ec46ea27d5cb20a770c1b80144f
># Parent  40bec5582eca28ec0bc896e4e9412d580e42f4e4
>add static const for local tables
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140207/6765007c/attachment.html>


More information about the x265-devel mailing list