[x265] [PATCH] build: use fabs() instead of abs() to remove clang warning in darwin

Pradeep Ramachandran pradeep at multicorewareinc.com
Tue Mar 8 06:47:50 CET 2016


# HG changeset patch
# User Pradeep Ramachandran <pradeep at multicorewareinc.com>
# Date 1457416052 -19800
#      Tue Mar 08 11:17:32 2016 +0530
# Node ID 0efdd3b1ade964a38c9c3fae66fbaa3c9bd0b40a
# Parent  88aebc166fa8e16f91d5f0acce77690003be9d91
build: use fabs() instead of abs() to remove clang warning in darwin

diff -r 88aebc166fa8 -r 0efdd3b1ade9 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Mar 04 16:59:45 2016 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue Mar 08 11:17:32 2016 +0530
@@ -2387,13 +2387,13 @@
         bool is2passCrfChange = false;
         if (m_2pass)
         {
-            if (abs(curEncData.m_avgQpRc - rce->qpPrev) > 0.1)
+            if (fabs(curEncData.m_avgQpRc - rce->qpPrev) > 0.1)
             {
                 qpRef = rce->qpPrev;
                 is2passCrfChange = true;
             }
         }
-        if (is2passCrfChange || abs(qpRef - rce->qpNoVbv) > 0.5)
+        if (is2passCrfChange || fabs(qpRef - rce->qpNoVbv) > 0.5)
         {
             double crfFactor = rce->qRceq /x265_qp2qScale(qpRef);
             double baseCplx = m_ncu * (m_param->bframes ? 120 : 80);


More information about the x265-devel mailing list