[x265] [PATCH] fix VS2008 ambiguous build failed on abs()

Min Chen chenm003 at 163.com
Wed Aug 19 02:21:36 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1439943089 25200
# Node ID 2046af73f118c3b1994c48a4eee3ef69c1bd8bff
# Parent  2980141a744a569ad6f60dbebdece76a4eababfd
fix VS2008 ambiguous build failed on abs()
---
 source/encoder/slicetype.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r 2980141a744a -r 2046af73f118 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Tue Aug 18 12:45:52 2015 +0530
+++ b/source/encoder/slicetype.cpp	Tue Aug 18 17:11:29 2015 -0700
@@ -1461,7 +1461,7 @@
             avgSatdCost /= cnt;
             for (int i= p1 ; i <= maxp1; i++)
             {
-                if (abs(frames[i]->costEst[i - p0][0] - avgSatdCost)  > 0.1 * avgSatdCost)
+                if (abs((double)(frames[i]->costEst[i - p0][0] - avgSatdCost))  > 0.1 * avgSatdCost)
                 {
                     fluctuate = true;
                     if (!m_isSceneTransition && frames[i]->bScenecut)



More information about the x265-devel mailing list