changeset 5747:119d09b54b95

rd: fix wrong chroma mode used for mode decision
author Deepthi Devaki <deepthidevaki@multicorewareinc.com>
date Tue, 17 Dec 2013 12:40:04 +0530
parents 37c57d47a9d4
children 37e0b00adeec
files source/Lib/TLibEncoder/TEncSearch.cpp
diffstat 1 files changed, 3 insertions(+-), 1 deletions(-) [+]
line wrap: on
line diff
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Mon Dec 16 15:33:45 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Dec 17 12:40:04 2013 +0530
@@ -2147,7 +2147,9 @@ void TEncSearch::getBestIntraModeChroma(
         for (int chromaId = 0; chromaId < 2; chromaId++)
         {
             int sad = 0;
-            uint32_t chromaPredMode = mode;
+            uint32_t chromaPredMode = modeList[mode];
+            if (chromaPredMode == DM_CHROMA_IDX)
+                chromaPredMode = cu->getLumaIntraDir(0);
             Pel*     fenc           = (chromaId > 0 ? fencYuv->getCrAddr(absPartIdx) : fencYuv->getCbAddr(absPartIdx));
             Pel*     pred           = (chromaId > 0 ? predYuv->getCrAddr(absPartIdx) : predYuv->getCbAddr(absPartIdx));