<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> - uint32_t origscore = weightCost(orig, origstride, fref, frefstride, weightTemp, width, height, NULL);<br>
> - if (!origscore)<br>
> - continue;<br>
> + if (origscore == 0)<br>
> + {<br>
> + origscore = weightCost(orig, origstride, fref, frefstride, cacheData.weightTemp, width, height, NULL);<br>
> + if (!origscore)<br>
> + continue;<br>
> + }<br>
<br>
So now it will cache the unweighted cost unless it was zero, then it<br>
will measure it every time? it seems a bit odd.<br></blockquote><div><br></div><div>It will measure the unweighted cost when origscore is zero (ie., when no cost is cached) . When origscore is non-zero, it will use the available cached inweighted cost.</div>
</div></div></div>