<div dir="ltr">Yep, realised the reviewers see only the patch, and no other part of the code.<br><div><div id="__tbSetup"></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 8:07 AM, 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"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Tue, Sep 17, 2013 at 9:50 AM, Deepthi Nandakumar <span dir="ltr"><<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">The idea behind this was to remove integer-type additions with bool variables. It likely works for all known cases, but would make the code cleaner. </div>
</blockquote><div><br></div></div><div>Oh, I see. Later in the function it does:</div><div><br></div><div>for (int i = 0; i < 1 + bBidir; i++)<br></div><div><br></div><div>in that case, all you need to do is change the type of bBidir to int. The other changes should be unnecessary.</div>
<div><div class="h5">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Sep 17, 2013 at 4:54 PM, Derek Buitenhuis <span dir="ltr"><<a href="mailto:derek.buitenhuis@gmail.com" target="_blank">derek.buitenhuis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>On 9/17/2013 11:52 AM, <a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Deepthi Nandakumar <<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>><br>
> # Date 1379415109 -19800<br>
> # Node ID defa0cb72646c483e7708e3f40a608e4be250818<br>
> # Parent 0d33ff236f68bc2238138a7213301b2efc0e6426<br>
> lookahead: change const bool to const int, so can be used safely in loop counter.<br>
<br>
</div>I'm not sure what the intended use is? Something a cast can't fix?<br>
<div><br>
> - const bool bBidir = (b < p1);<br>
> + const int bBidir = (b < p1) ? 1 : 0;<br>
<br>
</div>You don't need a branch here. (b < p1) will evaluate to 0 or 1,<br>
since C++ is only weakly statically typed.<br>
<div><br>
> - if (!bBidir)<br>
> + if (bBidir == 0)<br>
<br>
</div>This isn't necessary, but it may be the convention in the codebase?<br>
<br>
- Derek<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Steve Borho
</font></span></div></div>
<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" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>