[x265] [PATCH 5 of 5] predict: don't pass a Predict member variable to a Predict method

Steve Borho steve at borho.org
Fri Feb 27 21:05:21 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1425065841 21600
#      Fri Feb 27 13:37:21 2015 -0600
# Node ID ab33cd2caf9bfec89c4f4b14e0137b17975d0e01
# Parent  184bb358472e8fc5e904dff5965aba7ecdfe7680
predict: don't pass a Predict member variable to a Predict method

diff -r 184bb358472e -r ab33cd2caf9b source/common/predict.cpp
--- a/source/common/predict.cpp	Fri Feb 27 13:33:27 2015 -0600
+++ b/source/common/predict.cpp	Fri Feb 27 13:37:21 2015 -0600
@@ -591,13 +591,13 @@
     primitives.cu[sizeIdx].intra_pred[dirMode](dst, stride, intraNeighbourBuf[filter], dirMode, bFilter);
 }
 
-void Predict::predIntraChromaAng(uint32_t dirMode, pixel* dst, intptr_t stride, uint32_t log2TrSizeC, int chFmt)
+void Predict::predIntraChromaAng(uint32_t dirMode, pixel* dst, intptr_t stride, uint32_t log2TrSizeC)
 {
     int tuSize = 1 << log2TrSizeC;
     int sizeIdx = log2TrSizeC - 2;
     X265_CHECK(sizeIdx >= 0 && sizeIdx < 4, "intra block size is out of range\n");
 
-    int filter = !!(chFmt == X265_CSP_I444 && (g_intraFilterFlags[dirMode] & tuSize));
+    int filter = !!(m_csp == X265_CSP_I444 && (g_intraFilterFlags[dirMode] & tuSize));
     primitives.cu[sizeIdx].intra_pred[dirMode](dst, stride, intraNeighbourBuf[filter], dirMode, 0);
 }
 
diff -r 184bb358472e -r ab33cd2caf9b source/common/predict.h
--- a/source/common/predict.h	Fri Feb 27 13:33:27 2015 -0600
+++ b/source/common/predict.h	Fri Feb 27 13:37:21 2015 -0600
@@ -101,7 +101,7 @@
 
     /* Angular Intra */
     void predIntraLumaAng(uint32_t dirMode, pixel* pred, intptr_t stride, uint32_t log2TrSize);
-    void predIntraChromaAng(uint32_t dirMode, pixel* pred, intptr_t stride, uint32_t log2TrSizeC, int chFmt);
+    void predIntraChromaAng(uint32_t dirMode, pixel* pred, intptr_t stride, uint32_t log2TrSizeC);
     void initAdiPattern(const CUData& cu, const CUGeom& cuGeom, uint32_t puAbsPartIdx, const IntraNeighbors& intraNeighbors, int dirMode);
     void initAdiPatternChroma(const CUData& cu, const CUGeom& cuGeom, uint32_t puAbsPartIdx, const IntraNeighbors& intraNeighbors, uint32_t chromaId);
 
diff -r 184bb358472e -r ab33cd2caf9b source/encoder/search.cpp
--- a/source/encoder/search.cpp	Fri Feb 27 13:33:27 2015 -0600
+++ b/source/encoder/search.cpp	Fri Feb 27 13:37:21 2015 -0600
@@ -829,7 +829,7 @@
             initAdiPatternChroma(cu, cuGeom, absPartIdxC, intraNeighbors, chromaId);
 
             // get prediction signal
-            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC, m_csp);
+            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC);
             cu.setTransformSkipPartRange(0, ttype, absPartIdxC, tuIterator.absPartIdxStep);
 
             primitives.cu[sizeIdxC].calcresidual(fenc, pred, residual, stride);
@@ -917,7 +917,7 @@
                 chromaPredMode = g_chroma422IntraAngleMappingTable[chromaPredMode];
 
             // get prediction signal
-            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC, m_csp);
+            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC);
 
             uint64_t bCost = MAX_INT64;
             uint32_t bDist = 0;
@@ -1116,7 +1116,7 @@
             initAdiPatternChroma(cu, cuGeom, absPartIdxC, intraNeighbors, chromaId);
 
             // get prediction signal
-            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC, m_csp);
+            predIntraChromaAng(chromaPredMode, pred, stride, log2TrSizeC);
 
             X265_CHECK(!cu.m_transformSkip[ttype][0], "transform skip not supported at low RD levels\n");
 
@@ -1661,7 +1661,7 @@
             pixel* pred = predYuv->m_buf[chromaId];
             Predict::initAdiPatternChroma(cu, cuGeom, 0, intraNeighbors, chromaId);
             // get prediction signal
-            predIntraChromaAng(chromaPredMode, pred, fencYuv->m_csize, log2TrSizeC, m_csp);
+            predIntraChromaAng(chromaPredMode, pred, fencYuv->m_csize, log2TrSizeC);
             cost += primitives.cu[log2TrSizeC - 2].sa8d(fenc, predYuv->m_csize, pred, fencYuv->m_csize) << costShift;
         }
 


More information about the x265-devel mailing list