[x265] [PATCH] rdcost: fix warning in format specifier of X265_CHECK in calcRdCost

Divya Manivannan divya at multicorewareinc.com
Mon Aug 17 15:18:43 CEST 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1439817494 -19800
#      Mon Aug 17 18:48:14 2015 +0530
# Node ID 560bdb37c56dd6d7cc6470d740b4bcee5ae82ae4
# Parent  996ebce8c874fc511d495cee227d24413e99d0c1
rdcost: fix warning in format specifier of X265_CHECK in calcRdCost

diff -r 996ebce8c874 -r 560bdb37c56d source/encoder/rdcost.h
--- a/source/encoder/rdcost.h	Mon Aug 17 10:52:15 2015 +0530
+++ b/source/encoder/rdcost.h	Mon Aug 17 18:48:14 2015 +0530
@@ -90,8 +90,13 @@
 
     inline uint64_t calcRdCost(sse_ret_t distortion, uint32_t bits) const
     {
+#if X265_DEPTH <= 10
         X265_CHECK(bits <= (UINT64_MAX - 128) / m_lambda2,
                    "calcRdCost wrap detected dist: %u, bits %u, lambda: "X265_LL"\n", distortion, bits, m_lambda2);
+#else
+        X265_CHECK(bits <= (UINT64_MAX - 128) / m_lambda2,
+            "calcRdCost wrap detected dist: "X265_LL", bits %u, lambda: "X265_LL"\n", distortion, bits, m_lambda2);
+#endif
         return distortion + ((bits * m_lambda2 + 128) >> 8);
     }
 


More information about the x265-devel mailing list