<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 8: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 11/04, <a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Deepthi Nandakumar <<a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a>><br>
> # Date 1446636993 -19800<br>
> #      Wed Nov 04 17:06:33 2015 +0530<br>
> # Node ID c11dd97a8b999414c60dceef8620d3d9055cf4c1<br>
> # Parent  bd8237a5d78240b5e908f24727b4400f72cbfb0c<br>
> level: allow 8.5, param_parse detects obviously wrong levels for both float/int<br>
<br>
</span>this breaks --level 51<br></blockquote><div><br></div><div>why? something to do with atof (int) ? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> diff -r bd8237a5d782 -r c11dd97a8b99 source/common/param.cpp<br>
> --- a/source/common/param.cpp Wed Nov 04 14:03:10 2015 +0530<br>
> +++ b/source/common/param.cpp Wed Nov 04 17:06:33 2015 +0530<br>
> @@ -570,10 +570,14 @@<br>
>      OPT2("level-idc", "level")<br>
>      {<br>
>          /* allow "5.1" or "51", both converted to integer 51 */<br>
> -        if (atof(value) < 7)<br>
> +        /* if level-idc specifies an obviously wrong value in either float or int,<br>
> +        throw error consistently. Stronger level checking will be done in encoder_open()*/<br>
<br>
</span>nit<br>
<span class=""><br>
> +        if (atof(value) < 10)<br>
>              p->levelIdc = (int)(10 * atof(value) + .5);<br>
> -        else<br>
> +        else if (atoi(value) < 10)<br>
>              p->levelIdc = atoi(value);<br>
> +        else<br>
> +            bError = true;<br>
>      }<br>
>      OPT("high-tier") p->bHighTier = atobool(value);<br>
>      OPT("allow-non-conformance") p->bAllowNonConformance = atobool(value);<br>
</span>> _______________________________________________<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>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Steve Borho<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>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Deepthi Nandakumar<br></div>Engineering Manager, x265<br></div>Multicoreware, Inc<br></div></div>
</div></div>