[x265] [PATCH] param: update calculated maxCLL, maxFALL values to contentLightLevelInfo

kavitha at multicorewareinc.com kavitha at multicorewareinc.com
Wed Aug 26 09:09:42 CEST 2015


# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1440572877 -19800
#      Wed Aug 26 12:37:57 2015 +0530
# Node ID 73b94b3431f98bc94c2113d98f7788783453197e
# Parent  a28a863393994d8fb1d58c721352d9b4ec8c46ee
param: update calculated maxCLL, maxFALL values to contentLightLevelInfo

diff -r a28a86339399 -r 73b94b3431f9 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Aug 24 14:04:32 2015 +0530
+++ b/source/encoder/encoder.cpp	Wed Aug 26 12:37:57 2015 +0530
@@ -39,6 +39,10 @@
 
 #include "x265.h"
 
+#if _MSC_VER
+#pragma warning(disable: 4996) // POSIX functions are just fine, thanks
+#endif
+
 namespace X265_NS {
 const char g_sliceTypeToChar[] = {'B', 'P', 'I'};
 }
@@ -1046,6 +1050,14 @@
 
         stats->maxCLL         = m_analyzeAll.m_maxCLL;
         stats->maxFALL        = (uint16_t)(m_analyzeAll.m_maxFALL / m_analyzeAll.m_numPics);
+        if (m_param->contentLightLevelInfo)
+        {
+            free((char*)m_param->contentLightLevelInfo);
+
+            char value[16];
+            sprintf(value, "%hu,%hu", stats->maxCLL, stats->maxFALL);
+            m_param->contentLightLevelInfo = strdup(value);
+        }
     }
 
     /* If new statistics are added to x265_stats, we must check here whether the


More information about the x265-devel mailing list