<div dir="ltr"><div><br></div><div># HG changeset patch</div><div># User Aarthi Thirumalai</div><div># Date 1390567762 -19800</div><div># Fri Jan 24 18:19:22 2014 +0530</div><div># Node ID 118235a34a09be7a1a3b15aee18a6d5c08a3a71d</div>
<div># Parent 807495b7a9fc918b78ac664b273e973f03668818</div><div>slicetype: fix bug causing encoder crash in b-adapt 2 flow.</div><div><br></div><div>set initial value of best_cost to MAX_COST as frameCost will never be less than 0.</div>
<div><br></div><div>diff -r 807495b7a9fc -r 118235a34a09 source/encoder/slicetype.cpp</div><div>--- a/source/encoder/slicetype.cpp<span class="" style="white-space:pre"> </span>Fri Jan 24 11:50:23 2014 +0530</div><div>+++ b/source/encoder/slicetype.cpp<span class="" style="white-space:pre"> </span>Fri Jan 24 18:19:22 2014 +0530</div>
<div>@@ -637,7 +637,7 @@</div><div> {</div><div> char paths[2][X265_LOOKAHEAD_MAX + 1];</div><div> int num_paths = X265_MIN(cfg->param.bframes + 1, length);</div><div>- uint64_t best_cost = (uint64_t)-1;</div>
<div>+ uint64_t best_cost = (uint64_t)MotionEstimate::COST_MAX;</div><div> int idx = 0;</div><div> </div><div> /* Iterate over all currently possible paths */</div><div><br></div></div>