[x265] [PATCH 1/2] weight prediction: use sqrtf

Rafaël Carré funman at videolan.org
Wed Mar 5 11:38:05 CET 2014


---
 source/encoder/weightPrediction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/encoder/weightPrediction.cpp b/source/encoder/weightPrediction.cpp
index c04361a..c0710fd 100644
--- a/source/encoder/weightPrediction.cpp
+++ b/source/encoder/weightPrediction.cpp
@@ -203,7 +203,7 @@ bool WeightPrediction::checkDenom(int denom)
                 uint64_t fencVar = fenc->wp_ssd[yuv] + !ref->wp_ssd[yuv];
                 uint64_t refVar  = ref->wp_ssd[yuv] + !ref->wp_ssd[yuv];
                 if (fencVar && refVar)
-                    guessScale[yuv] = Clip3(-2.f, 1.8f, std::sqrt((float)fencVar / refVar));
+                    guessScale[yuv] = Clip3(-2.f, 1.8f, sqrtf((float)fencVar / refVar));
                 else
                     guessScale[yuv] = 1.8f;
                 fencMean[yuv] = (float)fenc->wp_sum[yuv] / (height[yuv] * width[yuv]) / (1 << (X265_DEPTH - 8));
-- 
1.9.0



More information about the x265-devel mailing list