<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 4:33 AM, Aarthi 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"># HG changeset patch<br>
# User Aarthi Thirumalai<br>
# Date 1383734012 -19800<br>
# Wed Nov 06 16:03:32 2013 +0530<br>
# Node ID 6b725179b61564df5b4eb497f783b193dcbda1e9<br>
# Parent 21e08cf159c552ff98334c98070b9cd442aaff27<br>
aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16<br></blockquote><div><br></div><div>no space before the :</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 21e08cf159c5 -r 6b725179b615 source/Lib/TLibCommon/TComPicYuv.cpp<br>
--- a/source/Lib/TLibCommon/TComPicYuv.cpp Wed Nov 06 15:43:19 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPicYuv.cpp Wed Nov 06 16:03:32 2013 +0530<br>
@@ -431,10 +431,12 @@<br></blockquote><div><br></div><div>this is only the 8bpp path, the HIGH_BIT_DEPTH path needs the same adjustments</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
uint8_t *v = (uint8_t*)pic.planes[2];<br>
<br>
/* width and height - without padsize */<br>
- int width = (m_picWidth * (pic.bitDepth > 8 ? 2 : 1)) - padx;<br>
- int height = m_picHeight - pady;<br>
-<br>
- // copy pixels by row into encoder's buffer<br>
+ int width = (m_picWidth * (pic.bitDepth > 8 ? 2 : 1)) - 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></blockquote><div><br></div><div>white-space alignment</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
for (int r = 0; r < height; r++)<br>
{<br>
memcpy(Y, y, width);<br>
diff -r 21e08cf159c5 -r 6b725179b615 source/common/lowres.cpp<br>
--- a/source/common/lowres.cpp Wed Nov 06 15:43:19 2013 +0530<br>
+++ b/source/common/lowres.cpp Wed Nov 06 16:03:32 2013 +0530<br>
@@ -150,31 +150,6 @@<br>
intraMbs[i] = 0;<br>
}<br>
<br>
- int y, extWidth = (orig->getWidth() + X265_LOWRES_CU_SIZE - 1);<br>
- int srcStride = orig->getStride();<br>
- int srcHeight = orig->getHeight();<br>
- int srcWidth = orig->getWidth();<br>
- Pel *src;<br>
- src = orig->getLumaAddr();<br>
-<br>
- /* extending right margin */<br>
- if (2 * width > srcWidth)<br>
- {<br>
- for (y = 0; y < srcHeight; y++)<br>
- {<br>
- ::memset(src + srcWidth, src[srcWidth - 1], sizeof(Pel) * (X265_LOWRES_CU_SIZE - 1));<br>
- src += srcStride;<br>
- }<br>
- }<br>
-<br>
- /* extending bottom margin */<br>
- src = orig->getLumaAddr() + (srcHeight - 1) * srcStride;<br>
-<br>
- for (y = 1; y <= 2 * lines - srcHeight; y++)<br>
- {<br>
- ::memcpy(src + y * srcStride, src, sizeof(Pel) * (extWidth));<br>
- }<br>
-<br>
/* downscale and generate 4 HPEL planes for lookahead */<br>
primitives.frame_init_lowres_core(orig->getLumaAddr(),<br>
lowresPlane[0], lowresPlane[1], lowresPlane[2], lowresPlane[3],<br></blockquote><div><br></div><div>The AQ code which iterates over 16x16 blocks also needs to be updated to account for the last padded block in each row, and at the bottom.</div>
<div><br></div><div>--</div><div>Steve</div></div></div></div>