[x265] magic number

Satoshi Nakagawa nakagawa424 at oki.com
Mon Jan 27 05:31:50 CET 2014


# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1390796651 -32400
#      Mon Jan 27 13:24:11 2014 +0900
# Node ID 2cf89252ef3b25e8cde008f9dbe580878dcd7638
# Parent  237bf66674056639581ef2aa3466ea2fc5523ceb
magic number

diff -r 237bf6667405 -r 2cf89252ef3b source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Fri Jan 24 14:43:31 2014 -0600
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Mon Jan 27 13:24:11 2014 +0900
@@ -128,7 +128,7 @@
     // default to no adaptive range
     for (int dir = 0; dir < 2; dir++)
     {
-        for (int ref = 0; ref < 33; ref++)
+        for (int ref = 0; ref < MAX_NUM_REF; ref++)
         {
             m_adaptiveRange[dir][ref] = cfg->param.searchRange;
         }
@@ -2492,13 +2492,13 @@
     MV mvzero(0, 0);
     MV mv[2];
     MV mvBidir[2];
-    MV mvTemp[2][33];
-    MV mvPred[2][33];
-    MV mvPredBi[2][33];
-
-    int mvpIdxBi[2][33];
-    int mvpIdx[2][33];
-    AMVPInfo amvpInfo[2][33];
+    MV mvTemp[2][MAX_NUM_REF];
+    MV mvPred[2][MAX_NUM_REF];
+    MV mvPredBi[2][MAX_NUM_REF];
+
+    int mvpIdxBi[2][MAX_NUM_REF];
+    int mvpIdx[2][MAX_NUM_REF];
+    AMVPInfo amvpInfo[2][MAX_NUM_REF];
 
     uint32_t mbBits[3] = { 1, 1, 0 };
     int refIdx[2] = { 0, 0 }; // If un-initialized, may cause SEGV in bi-directional prediction iterative stage.
diff -r 237bf6667405 -r 2cf89252ef3b source/Lib/TLibEncoder/TEncSearch.h
--- a/source/Lib/TLibEncoder/TEncSearch.h	Fri Jan 24 14:43:31 2014 -0600
+++ b/source/Lib/TLibEncoder/TEncSearch.h	Mon Jan 27 13:24:11 2014 +0900
@@ -100,7 +100,7 @@
 
     // ME parameters
     int             m_refLagPixels;
-    int             m_adaptiveRange[2][33];
+    int             m_adaptiveRange[2][MAX_NUM_REF];
     MV              m_mvPredictors[3];
 
     TComYuv         m_tmpYuvPred; // to avoid constant memory allocation/deallocation in xGetInterPredictionError()


More information about the x265-devel mailing list