<div dir="ltr">Thanks, I modified the earlier patch and pushed it<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 17, 2015 at 11:35 AM, <span dir="ltr"><<a href="mailto:kavitha@multicorewareinc.com" target="_blank">kavitha@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Kavitha Sampath <<a href="mailto:kavitha@multicorewareinc.com">kavitha@multicorewareinc.com</a>><br>
# Date 1439791372 -19800<br>
# Mon Aug 17 11:32:52 2015 +0530<br>
# Node ID 42d5e1b252fcc1a506d9bdcf97afeee4e4bfd922<br>
# Parent d56b2466c04459205287e1581d8a36eebf372ba6<br>
stats: log maxCLL and maxFALL values calculated from input pictures<br>
<br>
diff -r d56b2466c044 -r 42d5e1b252fc source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt Wed Aug 12 18:12:20 2015 +0530<br>
+++ b/source/CMakeLists.txt Mon Aug 17 11:32:52 2015 +0530<br>
@@ -30,7 +30,7 @@<br>
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)<br>
<br>
# X265_BUILD must be incremented each time the public API is changed<br>
-set(X265_BUILD 70)<br>
+set(X265_BUILD 71)<br>
configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265.def.in" rel="noreferrer" target="_blank">x265.def.in</a>"<br>
"${PROJECT_BINARY_DIR}/x265.def")<br>
configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265_config.h.in" rel="noreferrer" target="_blank">x265_config.h.in</a>"<br>
diff -r d56b2466c044 -r 42d5e1b252fc source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Wed Aug 12 18:12:20 2015 +0530<br>
+++ b/source/encoder/encoder.cpp Mon Aug 17 11:32:52 2015 +0530<br>
@@ -1038,6 +1038,9 @@<br>
stats->statsB.psnrU = m_analyzeB.m_psnrSumU / (double)m_analyzeB.m_numPics;<br>
stats->statsB.psnrV = m_analyzeB.m_psnrSumV / (double)m_analyzeB.m_numPics;<br>
stats->statsB.ssim = x265_ssim2dB(m_analyzeB.m_globalSsim / (double)m_analyzeB.m_numPics);<br>
+<br>
+ stats->maxCLL = m_analyzeAll.m_maxCLL;<br>
+ stats->maxFALL = (uint16_t)(m_analyzeAll.m_maxFALL / m_analyzeAll.m_numPics);<br>
}<br>
<br>
/* If new statistics are added to x265_stats, we must check here whether the<br>
@@ -1111,6 +1114,9 @@<br>
m_analyzeB.addSsim(ssim);<br>
}<br>
<br>
+ m_analyzeAll.m_maxFALL += curFrame->m_fencPic->m_avgLumaLevel;<br>
+ m_analyzeAll.m_maxCLL = X265_MAX(m_analyzeAll.m_maxCLL, curFrame->m_fencPic->m_maxLumaLevel);<br>
+<br>
char c = (slice->isIntra() ? 'I' : slice->isInterP() ? 'P' : 'B');<br>
int poc = slice->m_poc;<br>
if (!IS_REFERENCED(curFrame))<br>
diff -r d56b2466c044 -r 42d5e1b252fc source/encoder/encoder.h<br>
--- a/source/encoder/encoder.h Wed Aug 12 18:12:20 2015 +0530<br>
+++ b/source/encoder/encoder.h Mon Aug 17 11:32:52 2015 +0530<br>
@@ -47,6 +47,8 @@<br>
double m_totalQp;<br>
uint64_t m_accBits;<br>
uint32_t m_numPics;<br>
+ uint16_t m_maxCLL;<br>
+ double m_maxFALL;<br>
<br>
EncStats()<br>
{<br>
@@ -54,6 +56,8 @@<br>
m_accBits = 0;<br>
m_numPics = 0;<br>
m_totalQp = 0;<br>
+ m_maxCLL = 0;<br>
+ m_maxFALL = 0;<br>
}<br>
<br>
void addQP(double aveQp);<br>
diff -r d56b2466c044 -r 42d5e1b252fc source/x265-extras.cpp<br>
--- a/source/x265-extras.cpp Wed Aug 12 18:12:20 2015 +0530<br>
+++ b/source/x265-extras.cpp Mon Aug 17 11:32:52 2015 +0530<br>
@@ -36,7 +36,7 @@<br>
"I count, I ave-QP, I kbps, I-PSNR Y, I-PSNR U, I-PSNR V, I-SSIM (dB), "<br>
"P count, P ave-QP, P kbps, P-PSNR Y, P-PSNR U, P-PSNR V, P-SSIM (dB), "<br>
"B count, B ave-QP, B kbps, B-PSNR Y, B-PSNR U, B-PSNR V, B-SSIM (dB), "<br>
- "Version\n";<br>
+ "MaxCLL, MaxFALL, Version\n";<br>
<br>
FILE* x265_csvlog_open(const x265_api& api, const x265_param& param, const char* fname, int level)<br>
{<br>
@@ -273,7 +273,7 @@<br>
else<br>
fprintf(csvfp, " -, -, -, -, -, -, -,");<br>
<br>
- fprintf(csvfp, " %s\n", api.version_str);<br>
+ fprintf(csvfp, " %-6u, %-6u, %s\n", stats.maxCLL, stats.maxFALL, api.version_str);<br>
}<br>
<br>
/* The dithering algorithm is based on Sierra-2-4A error diffusion. */<br>
diff -r d56b2466c044 -r 42d5e1b252fc source/x265.h<br>
--- a/source/x265.h Wed Aug 12 18:12:20 2015 +0530<br>
+++ b/source/x265.h Mon Aug 17 11:32:52 2015 +0530<br>
@@ -385,6 +385,8 @@<br>
x265_sliceType_stats statsI; /* statistics of I slice */<br>
x265_sliceType_stats statsP; /* statistics of P slice */<br>
x265_sliceType_stats statsB; /* statistics of B slice */<br>
+ uint16_t maxCLL; /* maximum content light level */<br>
+ uint16_t maxFALL; /* maximum frame average light level */<br>
} x265_stats;<br>
<br>
/* String values accepted by x265_param_parse() (and CLI) for various parameters */<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>