[x265] [PATCH x265 - stable] dynamic-refine: fix memory reset size

bhavna at multicorewareinc.com bhavna at multicorewareinc.com
Tue Oct 30 11:29:47 CET 2018


# HG changeset patch
# User Bhavna Hariharan <bhavna at multicorewareinc.com>
# Date 1540452308 -19800
#      Thu Oct 25 12:55:08 2018 +0530
# Branch stable
# Node ID 3e4a041742707f3d2a4a8bc36b419dda83cd982c
# Parent  7e978ed93d6086973f87f607645339642ebb6ed0
dynamic-refine: fix memory reset size

diff -r 7e978ed93d60 -r 3e4a04174270 source/common/framedata.cpp
--- a/source/common/framedata.cpp	Wed Oct 10 11:39:28 2018 +0530
+++ b/source/common/framedata.cpp	Thu Oct 25 12:55:08 2018 +0530
@@ -83,9 +83,9 @@
     memset(m_rowStat, 0, sps.numCuInHeight * sizeof(*m_rowStat));
     if (m_param->bDynamicRefine)
     {
-        memset(m_picCTU->m_collectCURd, 0, MAX_NUM_DYN_REFINE * sizeof(uint64_t));
-        memset(m_picCTU->m_collectCUVariance, 0, MAX_NUM_DYN_REFINE * sizeof(uint32_t));
-        memset(m_picCTU->m_collectCUCount, 0, MAX_NUM_DYN_REFINE * sizeof(uint32_t));
+        memset(m_picCTU->m_collectCURd, 0, MAX_NUM_DYN_REFINE * sps.numCUsInFrame * sizeof(uint64_t));
+        memset(m_picCTU->m_collectCUVariance, 0, MAX_NUM_DYN_REFINE * sps.numCUsInFrame * sizeof(uint32_t));
+        memset(m_picCTU->m_collectCUCount, 0, MAX_NUM_DYN_REFINE * sps.numCUsInFrame * sizeof(uint32_t));
     }
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-clean.patch
Type: text/x-patch
Size: 1210 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20181030/eee1b42e/attachment.bin>


More information about the x265-devel mailing list