[x265] fix: rdLevel <= 1

Satoshi Nakagawa nakagawa424 at oki.com
Tue Apr 15 11:35:40 CEST 2014


# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1397554239 -32400
#      Tue Apr 15 18:30:39 2014 +0900
# Node ID e6a3492bcc87502c4d7d54746f0cbb77706c975e
# Parent  1cf67a7b362d24d292d7cca574cbcfe88a8eb1cb
fix: rdLevel <= 1

diff -r 1cf67a7b362d -r e6a3492bcc87 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Mon Apr 14 21:26:37 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Apr 15 18:30:39 2014 +0900
@@ -1440,8 +1440,8 @@
                 chromaPredMode = cu->getLumaIntraDir(0);
             }
             //===== init availability pattern =====
-            TComPattern::initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, chromaId);
-            pixel* chromaPred = TComPattern::getAdiChromaBuf(chromaId, height, m_predBuf);
+            TComPattern::initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, chromaId + 1);
+            pixel* chromaPred = TComPattern::getAdiChromaBuf(chromaId + 1, height, m_predBuf);
 
             //===== get prediction signal =====
             predIntraChromaAng(chromaPred, chromaPredMode, pred, stride, width, height, chFmt);
@@ -1807,8 +1807,8 @@
         costShift = 2;
     }
 
-    TComPattern::initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, 0);
     TComPattern::initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, 1);
+    TComPattern::initAdiPatternChroma(cu, absPartIdx, trDepth, m_predBuf, m_predBufStride, m_predBufHeight, 2);
     cu->getAllowedChromaDir(0, modeList);
     //----- check chroma modes -----
     for (uint32_t mode = minMode; mode < maxMode; mode++)
@@ -1822,7 +1822,7 @@
                 chromaPredMode = cu->getLumaIntraDir(0);
             pixel* fenc = (chromaId > 0 ? fencYuv->getCrAddr(absPartIdx) : fencYuv->getCbAddr(absPartIdx));
             pixel* pred = (chromaId > 0 ? predYuv->getCrAddr(absPartIdx) : predYuv->getCbAddr(absPartIdx));
-            pixel* chromaPred = TComPattern::getAdiChromaBuf(chromaId, height, m_predBuf);
+            pixel* chromaPred = TComPattern::getAdiChromaBuf(chromaId + 1, height, m_predBuf);
 
             //===== get prediction signal =====
             predIntraChromaAng(chromaPred, chromaPredMode, pred, stride, width, height, chFmt);


More information about the x265-devel mailing list