[x265] [PATCH] Avoiding spurious update of bDoSearch in weightsAnalyse()

shazeb at multicorewareinc.com shazeb at multicorewareinc.com
Fri Nov 15 13:11:28 CET 2013


# HG changeset patch
# User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
# Date 1384517432 -19800
#      Fri Nov 15 17:40:32 2013 +0530
# Node ID a9d4d8172ceb4589bfc2c66b505965090b42952f
# Parent  c45770e5a2aec2941061df4d0b44343f554504ae
Avoiding spurious update of bDoSearch in weightsAnalyse()

diff -r c45770e5a2ae -r a9d4d8172ceb source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Fri Nov 15 13:52:35 2013 +0530
+++ b/source/encoder/slicetype.cpp	Fri Nov 15 17:40:32 2013 +0530
@@ -294,7 +294,13 @@
     pixel *mcbuf = NULL;
     if (!fenc->bIntraCalculated)
     {
+        /* We don't want bDoSearch to get updated in this call to estimateFrameCost */
+        bool temp[2];
+        temp[0] = bDoSearch[0];
+        temp[1] = bDoSearch[1];
         estimateFrameCost(b, b, b, 0);
+        bDoSearch[0] = temp[0];
+        bDoSearch[1] = temp[1];
     }
     mcbuf = frames[p0]->lowresPlane[0];
     origscore = minscore = weightCostLuma(b, mcbuf, NULL);


More information about the x265-devel mailing list