[x265] [PATCH] noise reduction, use all eight categories of transform for inter blocks

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Aug 6 13:05:55 CEST 2014


# HG changeset patch
# User Praveen Tiwari
# Date 1407323068 -19800
# Node ID 1b245b31581f0558c16c4e7448e1708889689075
# Parent  ca70276334d293a269d52f79f9b96f831b3411dc
noise reduction, use all eight categories of transform for inter blocks

diff -r ca70276334d2 -r 1b245b31581f source/common/quant.cpp
--- a/source/common/quant.cpp	Tue Aug 05 17:35:05 2014 -0700
+++ b/source/common/quant.cpp	Wed Aug 06 16:34:28 2014 +0530
@@ -376,10 +376,10 @@
             primitives.dct[index](m_fencShortBuf, m_fencDctCoeff, trSize);
         }
 
-        if (m_nr->bNoiseReduction && !useDST)
+        if (m_nr->bNoiseReduction && (cu->getPredictionMode(absPartIdx) == MODE_INTER))
         {
-            denoiseDct(m_resiDctCoeff, m_nr->residualSum[sizeIdx], m_nr->offset[sizeIdx], trSize << 1);
-            m_nr->count[sizeIdx]++;
+            denoiseDct(m_resiDctCoeff, m_nr->residualSum[sizeIdx + (4 * !!ttype)], m_nr->offset[sizeIdx + (4 * !!ttype)], trSize << 1);
+            m_nr->count[sizeIdx + (4 * !!ttype)]++;
         }
     }
 
diff -r ca70276334d2 -r 1b245b31581f source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Tue Aug 05 17:35:05 2014 -0700
+++ b/source/encoder/frameencoder.cpp	Wed Aug 06 16:34:28 2014 +0530
@@ -900,8 +900,7 @@
     int transformSize[4] = {16, 64, 256, 1024};
     uint32_t blockCount[4] = {1 << 18, 1 << 16, 1 << 14, 1 << 12};
 
-    int isCspI444 = (m_param->internalCsp == X265_CSP_I444) ? 1 : 0;
-    for (int cat = 0; cat < 7 + isCspI444; cat++)
+    for (int cat = 0; cat < 8; cat++)
     {
         int index = cat % 4;
         int size = transformSize[index];


More information about the x265-devel mailing list