[x265] [PATCH] noise reduction, cleaned unused buffer space

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Aug 6 14:46:19 CEST 2014


# HG changeset patch
# User Praveen Tiwari
# Date 1407329168 -19800
# Node ID 15e9cff17f826cdf0a55a51a13dc3b33dcfa8cb9
# Parent  1b245b31581f0558c16c4e7448e1708889689075
noise reduction, cleaned unused buffer space

diff -r 1b245b31581f -r 15e9cff17f82 source/common/common.h
--- a/source/common/common.h	Wed Aug 06 16:34:28 2014 +0530
+++ b/source/common/common.h	Wed Aug 06 18:16:08 2014 +0530
@@ -190,8 +190,8 @@
     uint32_t *count;
 
     uint16_t offsetDenoise[8][1024];
-    uint32_t residualSumBuf[4][8][1024];
-    uint32_t countBuf[4][8];
+    uint32_t residualSumBuf[8][1024];
+    uint32_t countBuf[8];
 };
 
 /* defined in common.cpp */
diff -r 1b245b31581f -r 15e9cff17f82 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Wed Aug 06 16:34:28 2014 +0530
+++ b/source/encoder/frameencoder.cpp	Wed Aug 06 18:16:08 2014 +0530
@@ -117,12 +117,12 @@
 
     memset(&m_frameStats, 0, sizeof(m_frameStats));
     memset(m_nr.offsetDenoise, 0, sizeof(m_nr.offsetDenoise[0][0]) * 8 * 1024);
-    memset(m_nr.residualSumBuf, 0, sizeof(m_nr.residualSumBuf[0][0][0]) * 4 * 8 * 1024);
-    memset(m_nr.countBuf, 0, sizeof(m_nr.countBuf[0][0]) * 4 * 8);
+    memset(m_nr.residualSumBuf, 0, sizeof(m_nr.residualSumBuf[0][0]) * 8 * 1024);
+    memset(m_nr.countBuf, 0, sizeof(m_nr.countBuf[0]) * 8);
 
     m_nr.offset = m_nr.offsetDenoise;
-    m_nr.residualSum = m_nr.residualSumBuf[0];
-    m_nr.count = m_nr.countBuf[0];
+    m_nr.residualSum = m_nr.residualSumBuf;
+    m_nr.count = m_nr.countBuf;
     m_nr.bNoiseReduction = !!m_param->noiseReduction;
 
     start();
@@ -894,8 +894,8 @@
         return;
 
     m_nr.offset = m_nr.offsetDenoise;
-    m_nr.residualSum = m_nr.residualSumBuf[0];
-    m_nr.count = m_nr.countBuf[0];
+    m_nr.residualSum = m_nr.residualSumBuf;
+    m_nr.count = m_nr.countBuf;
 
     int transformSize[4] = {16, 64, 256, 1024};
     uint32_t blockCount[4] = {1 << 18, 1 << 16, 1 << 14, 1 << 12};


More information about the x265-devel mailing list