<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div><br></div><div></div><div id="divNeteaseMailCard"></div><div><br></div>ÔÚ 2015-11-20 19:43:30£¬"Deepthi Nandakumar" <deepthi@multicorewareinc.com> дµÀ£º<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 18, 2015 at 10:44 PM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>><br>
# Date 1447865926 21600<br>
# Node ID 600706db4e14bd95a5d933418186f86403e897f4<br>
# Parent e160de7083971f21802517691f9a3a0934765952<br>
optimize SAO statistics initialize<br>
---<br>
source/encoder/sao.cpp | 52 ++++++++++++++++++++++++-----------------------<br>
1 files changed, 27 insertions(+), 25 deletions(-)<br>
<br>
diff -r e160de708397 -r 600706db4e14 source/encoder/sao.cpp<br>
--- a/source/encoder/sao.cpp Wed Nov 18 10:58:43 2015 -0600<br>
+++ b/source/encoder/sao.cpp Wed Nov 18 10:58:46 2015 -0600<br>
@@ -1156,32 +1156,34 @@<br>
if (allowMerge[1])<br>
m_entropyCoder.codeSaoMerge(0);<br>
m_entropyCoder.store(m_rdContexts.temp);<br>
+<br>
// reset stats Y, Cb, Cr<br>
- for (int plane = 0; plane < 3; plane++)<br>
+ X265_CHECK(sizeof(PerPlane) == (sizeof(int32_t) * (NUM_PLANE * MAX_NUM_SAO_TYPE * MAX_NUM_SAO_CLASS)), "Found Padding space in struct PerPlane");<br>
+<br>
+ // TODO: Confirm the address space is continuous<br>
+ memset(m_count, 0, 3 * sizeof(m_count[0]));<br></blockquote><div><br></div><div>Now that we're cleaning this up, m_count is confusing. PerClass is a 2D int array, and we're allocating one per plane? Can we clean this up once and for all in the malloc part itself? </div><div><br></div><div>Pointer and *Pointer is clean, it means size of point to object</div><div>the confuse on declare of PerClass, maybe we need modify it to more clean.<br><br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><br></blockquote></div></div></div></blockquote></div>