<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 5, 2013 at 9:45 AM,  <span dir="ltr"><<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Aarthi Thirumalai<<a href="mailto:aarthi@multicorewareinc.com">aarthi@multicorewareinc.com</a>><br>
# Date 1383666119 -19800<br>
#      Tue Nov 05 21:11:59 2013 +0530<br>
# Node ID 00a0690f4e3efb69f80a5750ea3a7f0ec493e013<br>
# Parent  ece7af249573a3965d21589f8e1d54a8e1cd2ce9<br>
aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16<br>
     when aqMode is enabled.<br></blockquote><div><br></div><div>I don't think we want to add the padding in this way; this makes the encoder actually encode out to the 16byte boundary, which makes extra work for the encoder.</div>
<div><br></div><div>Instead, where the padding is done in copyFromPicture, I think it should just pad out past the pad value that was calculated here.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
diff -r ece7af249573 -r 00a0690f4e3e source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp        Tue Nov 05 14:12:39 2013 +0530<br>
+++ b/source/encoder/encoder.cpp        Tue Nov 05 21:11:59 2013 +0530<br>
@@ -1122,6 +1122,11 @@<br>
     //======== set pad size if width is not multiple of the minimum CU size =========<br>
     uint32_t maxCUDepth = (uint32_t)g_convertToBit[_param->maxCUSize];<br>
     uint32_t minCUDepth = (_param->maxCUSize >> (maxCUDepth - 1));<br>
+<br>
+    // Extend the width/height as multiples of 16.<br>
+    if (minCUDepth < 16 && (param.rc.aqMode || param.bEnableWeightedPred))<br>
+        minCUDepth = 16;<br>
+<br>
     if ((_param->sourceWidth % minCUDepth) != 0)<br>
     {<br>
         uint32_t padsize = 0;<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>