Commits

Steve Borho committed 949f853 Merge

Merge with stable

Comments (0)

Files changed (2)

source/encoder/CMakeLists.txt

         "/wd4244 /wd4512 /wd4127 /wd4389 /wd4018 /wd4800")
 endif(MSVC)
 
+check_include_files(inttypes.h HAVE_INT_TYPES_H)
+if(HAVE_INT_TYPES_H)
+    add_definitions(-DHAVE_INT_TYPES_H=1)
+endif()
+
 add_library(encoder OBJECT ../x265.h
     ${LIBENCODER_SRC} ${LIBENCODER_HDR}
     bitcost.cpp bitcost.h

source/encoder/encoder.cpp

 #include <string.h>
 #include <time.h>
 
+#if HAVE_INT_TYPES_H
+#include <inttypes.h>
+#define LL "%I64d"
+#else
+#define LL "%lld"
+#endif
+
 using namespace x265;
 
 Encoder::Encoder()
                 if (sliceType == I_SLICE)
                     cntIntraNxN = (finalLog.cntIntraNxN * 100) / finalLog.cntTotalCu[depth];
             }
-#if defined(_MSC_VER)
-#define LL "%I64d"
-#else
-#define LL "%lld"
-#endif
             // print statistics
             if (sliceType != I_SLICE)
             {