<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 7, 2013 at 10:50 PM, Aarthi Priya Thirumalai <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"><p></p><div class="im"><br>
On Nov 7, 2013 11:24 PM, "Steve Borho" <<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>> wrote:<br>
><br>
><br>
><br>
><br>
> On Thu, Nov 7, 2013 at 5:17 AM, Aarthi Thirumalai <<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>> wrote:<br>
>><br>
>> # HG changeset patch<br>
>> # User Aarthi Thirumalai<br>
>> # Date 1383823017 -19800<br>
>> #      Thu Nov 07 16:46:57 2013 +0530<br>
>> # Node ID 0823d243b4e2f9eee6323a9750eeb811bccbad77<br>
>> # Parent  85002898f5b4308547af6ce464bbdff5f360fa13<br>
>>  aq: bug fix.extend border of TComPic::m_origPicYuv to a multiple of 16<br>
>><br>
>> diff -r 85002898f5b4 -r 0823d243b4e2 source/Lib/TLibCommon/TComPicYuv.cpp<br>
>> --- a/source/Lib/TLibCommon/TComPicYuv.cpp      Thu Nov 07 14:31:05 2013 +0530<br>
>> +++ b/source/Lib/TLibCommon/TComPicYuv.cpp      Thu Nov 07 16:46:57 2013 +0530<br>
>> @@ -345,6 +345,10 @@<br>
>>          /* width and height - without padsize */<br>
>>          int width = m_picWidth - padx;<br>
>>          int height = m_picHeight - pady;<br>
>> +        uint8_t rem = m_picWidth % 16;<br>
>> +        padx += rem ? 16 - rem : 0;<br>
>> +        rem = m_picHeight % 16;<br>
>> +        pady += rem ? 16 - rem : 0;<br>
><br>
><br>
> if the row width was 17, padx would already be 3 in order to pad out to the nearest multiple of 4.  You would be doing:  padx += 15, which would result in a pad of 18, which is more than what you bargained for.  I believe the += should just be =.  Also, Gopu just added a new else {} clause this is missed here, so I've hoisted this operation higher in the file.<br>


>  <br></div>
>>when row width is 17, padx is already 3 and m_picWidth would be  20 at this stage. So padx += 12 not 15..</blockquote><div><br></div><div>yes, you're correct.  Fortunately this only needs to be fixed in one place; can you send a patch for it?</div>
<div><br></div><div>--</div><div>Steve</div></div></div></div>