<div dir="ltr">From d480d271c7174cb9f05097297d7b9254f64dbc88 Mon Sep 17 00:00:00 2001<br>From: Karam Singh <<a href="mailto:karam.singh@multicorewareinc.com">karam.singh@multicorewareinc.com</a>><br>Date: Mon, 11 Dec 2023 16:13:40 +0530<br>Subject: [PATCH 08/10] search range optimization-2<br><br>---<br> source/common/temporalfilter.cpp | 21 +--------------------<br> 1 file changed, 1 insertion(+), 20 deletions(-)<br><br>diff --git a/source/common/temporalfilter.cpp b/source/common/temporalfilter.cpp<br>index 521e367c8..db58a0c15 100644<br>--- a/source/common/temporalfilter.cpp<br>+++ b/source/common/temporalfilter.cpp<br>@@ -893,26 +893,7 @@ void TemporalFilter::motionEstimationLumaDoubleRes(MV *mvs, uint32_t mvStride, P<br>             }<br> <br>             prevBest = best;<br>-            int doubleRange = 1 * 4;<br>-            for (int y2 = prevBest.y - doubleRange; y2 <= prevBest.y + doubleRange; y2 += 4)<br>-            {<br>-                for (int x2 = prevBest.x - doubleRange; x2 <= prevBest.x + doubleRange; x2 += 4)<br>-                {<br>-                    if (m_useSADinME)<br>-                        error = motionErrorLumaSAD(orig->m_picOrg[0], orig->m_stride, buffer->m_picOrg[0], blockX, blockY, x2, y2, blockSize, leastError);<br>-                    else<br>-                        error = motionErrorLumaSSD(orig->m_picOrg[0], orig->m_stride, buffer->m_picOrg[0], blockX, blockY, x2, y2, blockSize, leastError);<br>-<br>-                    if (error < leastError)<br>-                    {<br>-                        best.set(x2, y2);<br>-                        leastError = error;<br>-                    }<br>-                }<br>-            }<br>-<br>-            prevBest = best;<br>-            doubleRange = 3;<br>+            int doubleRange = 3;<br>             for (int y2 = prevBest.y - doubleRange; y2 <= prevBest.y + doubleRange; y2++)<br>             {<br>                 for (int x2 = prevBest.x - doubleRange; x2 <= prevBest.x + doubleRange; x2++)<br>-- <br>2.36.0.windows.1<br><br></div>