<div dir="ltr">This patch has been pushed to the public repo. <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>__________________________</b></div><div><b>Karam Singh</b></div><div><b>Ph.D. IIT Guwahati</b></div><div><font size="1">Senior Software (Video Coding) Engineer </font></div><div><font size="1">Mobile: +91 8011279030</font></div><div><font size="1">Block 9A, 6th floor, DLF Cyber City</font></div><div><font size="1">Manapakkam, Chennai 600 089</font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 11, 2024 at 9:49 PM George Steed <<a href="mailto:george.steed@arm.com">george.steed@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">These copies are reasonably hot in perf traces and there is no need to<br>
copy the pointers here. Just set a pointer to the array to read from and<br>
use that directly.<br>
<br>
Benchmarks show this gives a nice improvement in FPS reported for an<br>
encoding using --preset=medium:<br>
<br>
Cortex-A715: +0.2%<br>
Cortex-X3: +0.7%<br>
Neoverse V2: +0.9%<br>
<br>
Change-Id: I33ba6854e7fbe6ecb1778b8201030a717f60f34e<br>
---<br>
source/common/lowres.h | 12 ++----------<br>
1 file changed, 2 insertions(+), 10 deletions(-)<br>
<br>
diff --git a/source/common/lowres.h b/source/common/lowres.h<br>
index c9c2e3712..7e6baa844 100644<br>
--- a/source/common/lowres.h<br>
+++ b/source/common/lowres.h<br>
@@ -71,11 +71,7 @@ struct ReferencePlanes<br>
inline pixel *lowresMC(intptr_t blockOffset, const MV& qmv, pixel *buf, intptr_t& outstride, bool hme)<br>
{<br>
intptr_t YStride = hme ? lumaStride / 2 : lumaStride;<br>
- pixel *plane[4];<br>
- for (int i = 0; i < 4; i++)<br>
- {<br>
- plane[i] = hme ? lowerResPlane[i] : lowresPlane[i];<br>
- }<br>
+ pixel **plane = hme ? lowerResPlane : lowresPlane;<br>
if ((qmv.x | qmv.y) & 1)<br>
{<br>
int hpelA = (qmv.y & 2) | ((qmv.x & 2) >> 1);<br>
@@ -98,11 +94,7 @@ struct ReferencePlanes<br>
inline int lowresQPelCost(pixel *fenc, intptr_t blockOffset, const MV& qmv, pixelcmp_t comp, bool hme)<br>
{<br>
intptr_t YStride = hme ? lumaStride / 2 : lumaStride;<br>
- pixel *plane[4];<br>
- for (int i = 0; i < 4; i++)<br>
- {<br>
- plane[i] = hme ? lowerResPlane[i] : lowresPlane[i];<br>
- }<br>
+ pixel **plane = hme ? lowerResPlane : lowresPlane;<br>
if ((qmv.x | qmv.y) & 1)<br>
{<br>
ALIGN_VAR_16(pixel, subpelbuf[8 * 8]);<br>
-- <br>
2.34.1<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div>