[x265] [PATCH] compilation fix in dhdr10

bhavna at multicorewareinc.com bhavna at multicorewareinc.com
Thu Apr 20 14:47:07 CEST 2017


# HG changeset patch
# User Bhavna Hariharan <bhavna at multicorewareinc.com>
# Date 1492676577 -19800
#      Thu Apr 20 13:52:57 2017 +0530
# Branch stable
# Node ID 4396b679ffa6a77630fff7a99b7c21852ad23592
# Parent  6dc49dcff6da50aab6e098f35194ea1c8098db2f
compilation fix in dhdr10

diff -r 6dc49dcff6da -r 4396b679ffa6 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Wed Apr 19 23:01:07 2017 -0700
+++ b/source/encoder/encoder.cpp	Thu Apr 20 13:52:57 2017 +0530
@@ -85,10 +85,12 @@
     for (int i = 0; i < X265_MAX_FRAME_THREADS; i++)
         m_frameEncoder[i] = NULL;
     MotionEstimate::initScales();
+
 #if ENABLE_DYNAMIC_HDR10
     m_hdr10plus_api = hdr10plus_api_get();
+#endif
+
     m_prevTonemapPayload.payload = NULL;
-#endif
 }
 inline char *strcatFilename(const char *input, const char *suffix)
 {
diff -r 6dc49dcff6da -r 4396b679ffa6 source/encoder/encoder.h
--- a/source/encoder/encoder.h	Wed Apr 19 23:01:07 2017 -0700
+++ b/source/encoder/encoder.h	Thu Apr 20 13:52:57 2017 +0530
@@ -31,7 +31,10 @@
 #include "x265.h"
 #include "nal.h"
 #include "framedata.h"
-#include "dynamicHDR10\hdr10plus.h"
+
+#ifdef ENABLE_DYNAMIC_HDR10
+    #include "dynamicHDR10\hdr10plus.h"
+#endif
 
 struct x265_encoder {};
 namespace X265_NS {
@@ -174,15 +177,21 @@
     double                m_cR;
 
     int                     m_bToneMap; // Enables tone-mapping
-    const hdr10plus_api*    m_hdr10plus_api;
+
+#ifdef ENABLE_DYNAMIC_HDR10
+    const hdr10plus_api     *m_hdr10plus_api;
+#endif
+
     x265_sei_payload        m_prevTonemapPayload;
 
     Encoder();
-    ~Encoder() 
+    ~Encoder()
     {
+#ifdef ENABLE_DYNAMIC_HDR10
         if (m_prevTonemapPayload.payload != NULL)
             X265_FREE(m_prevTonemapPayload.payload);
-    }
+#endif
+    };
 
     void create();
     void stopJobs();
diff -r 6dc49dcff6da -r 4396b679ffa6 source/encoder/sei.cpp
--- a/source/encoder/sei.cpp	Wed Apr 19 23:01:07 2017 -0700
+++ b/source/encoder/sei.cpp	Thu Apr 20 13:52:57 2017 +0530
@@ -48,8 +48,8 @@
         /* virtual writeSEI method, write to bit counter to determine size */
         writeSEI(sps);
         m_bitIf = &bs;
-        uint32_t type = m_payloadType;
-        for (; type >= 0xff; type -= 0xff)
+        uint32_t payloadType = m_payloadType;
+        for (; payloadType >= 0xff; payloadType -= 0xff)
             WRITE_CODE(0xff, 8, "payload_type");
     }
     WRITE_CODE(type, 8, "payload_type");


More information about the x265-devel mailing list