<div dir="ltr">Pushed with a build number update<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 31, 2015 at 11:36 PM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/31, <a href="mailto:kavitha@multicorewareinc.com">kavitha@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Kavitha Sampath <<a href="mailto:kavitha@multicorewareinc.com">kavitha@multicorewareinc.com</a>><br>
> # Date 1441031550 -19800<br>
> # Mon Aug 31 20:02:30 2015 +0530<br>
> # Node ID 838b20d69bbc6470c3f466a3270602ab7c93a99f<br>
> # Parent 20941da8ac6a115e88a419ba713ee9ea10d70c7e<br>
> param: replace contentLightLevelInfo with seperate integers maxCLL and maxFALL<br>
<br>
</span>LGTM<br>
<div class="HOEnZb"><div class="h5"><br>
> diff -r 20941da8ac6a -r 838b20d69bbc source/common/param.cpp<br>
> --- a/source/common/param.cpp Fri Aug 28 17:51:54 2015 -0700<br>
> +++ b/source/common/param.cpp Mon Aug 31 20:02:30 2015 +0530<br>
> @@ -241,6 +241,8 @@<br>
> param->vui.defDispWinRightOffset = 0;<br>
> param->vui.defDispWinTopOffset = 0;<br>
> param->vui.defDispWinBottomOffset = 0;<br>
> + param->maxCLL = 0;<br>
> + param->maxFALL = 0;<br>
> param->minLuma = 0;<br>
> param->maxLuma = (1 << X265_DEPTH) - 1;<br>
> }<br>
> @@ -856,7 +858,7 @@<br>
> OPT("analysis-file") p->analysisFileName = strdup(value);<br>
> OPT("qg-size") p->rc.qgSize = atoi(value);<br>
> OPT("master-display") p->masteringDisplayColorVolume = strdup(value);<br>
> - OPT("max-cll") p->contentLightLevelInfo = strdup(value);<br>
> + OPT("max-cll") bError |= sscanf(value, "%hu,%hu", &p->maxCLL, &p->maxFALL) != 2;<br>
> OPT("min-luma") p->minLuma = (uint16_t)atoi(value);<br>
> OPT("max-luma") p->maxLuma = (uint16_t)atoi(value);<br>
> else<br>
> diff -r 20941da8ac6a -r 838b20d69bbc source/encoder/encoder.cpp<br>
> --- a/source/encoder/encoder.cpp Fri Aug 28 17:51:54 2015 -0700<br>
> +++ b/source/encoder/encoder.cpp Mon Aug 31 20:02:30 2015 +0530<br>
> @@ -337,6 +337,8 @@<br>
> m_encodeStartTime = x265_mdate();<br>
><br>
> m_nalList.m_annexB = !!m_param->bAnnexB;<br>
> +<br>
> + m_emitCLLSEI = p->maxCLL || p->maxFALL;<br>
> }<br>
><br>
> void Encoder::stopJobs()<br>
> @@ -410,7 +412,6 @@<br>
> free((char*)m_param->scalingLists);<br>
> free((char*)m_param->numaPools);<br>
> free((char*)m_param->masteringDisplayColorVolume);<br>
> - free((char*)m_param->contentLightLevelInfo);<br>
><br>
> PARAM_NS::x265_param_free(m_param);<br>
> }<br>
> @@ -1130,13 +1131,11 @@<br>
><br>
> stats->maxCLL = m_analyzeAll.m_maxCLL;<br>
> stats->maxFALL = (uint16_t)(m_analyzeAll.m_maxFALL / m_analyzeAll.m_numPics);<br>
> - if (m_param->contentLightLevelInfo)<br>
> +<br>
> + if (m_emitCLLSEI)<br>
> {<br>
> - free((char*)m_param->contentLightLevelInfo);<br>
> -<br>
> - char value[16];<br>
> - sprintf(value, "%hu,%hu", stats->maxCLL, stats->maxFALL);<br>
> - m_param->contentLightLevelInfo = strdup(value);<br>
> + m_param->maxCLL = stats->maxCLL;<br>
> + m_param->maxFALL = stats->maxFALL;<br>
> }<br>
> }<br>
><br>
> @@ -1320,18 +1319,15 @@<br>
> x265_log(m_param, X265_LOG_WARNING, "unable to parse mastering display color volume info\n");<br>
> }<br>
><br>
> - if (m_param->contentLightLevelInfo)<br>
> + if (m_emitCLLSEI)<br>
> {<br>
> SEIContentLightLevel cllsei;<br>
> - if (cllsei.parse(m_param->contentLightLevelInfo))<br>
> - {<br>
> - bs.resetBits();<br>
> - cllsei.write(bs, m_sps);<br>
> - bs.writeByteAlignment();<br>
> - list.serialize(NAL_UNIT_PREFIX_SEI, bs);<br>
> - }<br>
> - else<br>
> - x265_log(m_param, X265_LOG_WARNING, "unable to parse content light level info\n");<br>
> + cllsei.max_content_light_level = m_param->maxCLL;<br>
> + cllsei.max_pic_average_light_level = m_param->maxFALL;<br>
> + bs.resetBits();<br>
> + cllsei.write(bs, m_sps);<br>
> + bs.writeByteAlignment();<br>
> + list.serialize(NAL_UNIT_PREFIX_SEI, bs);<br>
> }<br>
><br>
> if (m_param->bEmitInfoSEI)<br>
> diff -r 20941da8ac6a -r 838b20d69bbc source/encoder/encoder.h<br>
> --- a/source/encoder/encoder.h Fri Aug 28 17:51:54 2015 -0700<br>
> +++ b/source/encoder/encoder.h Mon Aug 31 20:02:30 2015 +0530<br>
> @@ -117,6 +117,7 @@<br>
> NALList m_nalList;<br>
> ScalingList m_scalingList; // quantization matrix information<br>
><br>
> + bool m_emitCLLSEI;<br>
> int m_lastBPSEI;<br>
> uint32_t m_numDelayedPic;<br>
><br>
> diff -r 20941da8ac6a -r 838b20d69bbc source/encoder/sei.h<br>
> --- a/source/encoder/sei.h Fri Aug 28 17:51:54 2015 -0700<br>
> +++ b/source/encoder/sei.h Mon Aug 31 20:02:30 2015 +0530<br>
> @@ -163,12 +163,6 @@<br>
><br>
> PayloadType payloadType() const { return CONTENT_LIGHT_LEVEL_INFO; }<br>
><br>
> - bool parse(const char* value)<br>
> - {<br>
> - return sscanf(value, "%hu,%hu",<br>
> - &max_content_light_level, &max_pic_average_light_level) == 2;<br>
> - }<br>
> -<br>
> void write(Bitstream& bs, const SPS&)<br>
> {<br>
> m_bitIf = &bs;<br>
> diff -r 20941da8ac6a -r 838b20d69bbc source/x265.h<br>
> --- a/source/x265.h Fri Aug 28 17:51:54 2015 -0700<br>
> +++ b/source/x265.h Mon Aug 31 20:02:30 2015 +0530<br>
> @@ -1176,12 +1176,17 @@<br>
> * max,min luminance values. */<br>
> const char* masteringDisplayColorVolume;<br>
><br>
> - /* Content light level info SEI, specified as a string which is parsed when<br>
> - * the stream header SEI are emitted. The string format is "%hu,%hu" where<br>
> - * %hu are unsigned 16bit integers. The first value is the max content light<br>
> - * level (or 0 if no maximum is indicated), the second value is the maximum<br>
> - * picture average light level (or 0). */<br>
> - const char* contentLightLevelInfo;<br>
> + /* Maximum Content light level(MaxCLL), specified as integer that indicates the<br>
> + * maximum pixel intensity level in units of 1 candela per square metre of the<br>
> + * bitstream. x265 will also calculate MaxCLL programmatically from the input<br>
> + * pixel values and set in the Content light level info SEI */<br>
> + uint16_t maxCLL;<br>
> +<br>
> + /* Maximum Frame Average Light Level(MaxFALL), specified as integer that indicates<br>
> + * the maximum frame average intensity level in units of 1 candela per square<br>
> + * metre of the bitstream. x265 will also calculate MaxFALL programmatically<br>
> + * from the input pixel values and set in the Content light level info SEI */<br>
> + uint16_t maxFALL;<br>
><br>
> /* Minimum luma level of input source picture, specified as a integer which<br>
> * would automatically increase any luma values below the specified --min-luma<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>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Steve Borho<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>