<div dir="ltr"><div><div><div>Agreed that's the general philosophy. But this works better if the user wants to regenerate headers, because the encoder->param has now been reset.  Else, the user is responsible for <br><br>a) copying stats->maxCLL to user Param<br></div>b) doing an encoder reconfig, and copying user param to encoder->param<br></div>c) generate headers<br><br></div>What we have here avoids step 1 and 2.<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 4:53 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/26, <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 1440572877 -19800<br>
> #      Wed Aug 26 12:37:57 2015 +0530<br>
> # Node ID 73b94b3431f98bc94c2113d98f7788783453197e<br>
> # Parent  a28a863393994d8fb1d58c721352d9b4ec8c46ee<br>
> param: update calculated maxCLL, maxFALL values to contentLightLevelInfo<br>
<br>
</span>the encoder is generally supposed to treat the param structure as<br>
read-only (the encoder keeps a seperate copy from what the cli/user<br>
passed into the encoder creation function).<br>
<div class="HOEnZb"><div class="h5"><br>
> diff -r a28a86339399 -r 73b94b3431f9 source/encoder/encoder.cpp<br>
> --- a/source/encoder/encoder.cpp      Mon Aug 24 14:04:32 2015 +0530<br>
> +++ b/source/encoder/encoder.cpp      Wed Aug 26 12:37:57 2015 +0530<br>
> @@ -39,6 +39,10 @@<br>
><br>
>  #include "x265.h"<br>
><br>
> +#if _MSC_VER<br>
> +#pragma warning(disable: 4996) // POSIX functions are just fine, thanks<br>
> +#endif<br>
> +<br>
>  namespace X265_NS {<br>
>  const char g_sliceTypeToChar[] = {'B', 'P', 'I'};<br>
>  }<br>
> @@ -1046,6 +1050,14 @@<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>
> +            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>
> +        }<br>
>      }<br>
><br>
>      /* If new statistics are added to x265_stats, we must check here whether the<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>