<div dir="ltr">Thanks, queued for testing.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 12:18 PM, <span dir="ltr"><<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""># HG changeset patch<br>
# User Aarthi Thirumalai<br>
# Date 1424063038 -19800<br>
# Mon Feb 16 10:33:58 2015 +0530<br>
</span># Node ID 540697e77bbce88e1065035d41b5222da45318cb<br>
<span class=""># Parent 164bd8337e72624a7605424cc3bdc67042dd5294<br>
slicetype: fix the BRef cost estimates in vbv lookahead.<br>
<br>
</span>diff -r 164bd8337e72 -r 540697e77bbc source/encoder/slicetype.cpp<br>
<span class="">--- a/source/encoder/slicetype.cpp Sun Feb 15 20:13:22 2015 -0600<br>
+++ b/source/encoder/slicetype.cpp Mon Feb 16 10:33:58 2015 +0530<br>
@@ -580,7 +580,9 @@<br>
curNonB++;<br>
int nextNonB = keyframe ? prevNonB : curNonB;<br>
int nextB = prevNonB + 1;<br>
- int nextBRef = 0;<br>
+ int nextBRef = 0, curBRef = 0;<br>
+ if (m_param->bBPyramid && curNonB - prevNonB > 1)<br>
+ curBRef = (prevNonB + curNonB + 1) / 2;<br>
int miniGopEnd = keyframe ? prevNonB : curNonB;<br>
while (curNonB < numFrames + !keyframe)<br>
{<br>
@@ -597,7 +599,6 @@<br>
{<br>
frames[j]->plannedSatd[frames[j]->indB] = frames[nextNonB]->plannedSatd[idx];<br>
frames[j]->plannedType[frames[j]->indB++] = frames[nextNonB]->plannedType[idx];<br>
-<br>
}<br>
}<br>
idx++;<br>
</span>@@ -622,19 +623,19 @@<br>
satdCost = vbvFrameCost(frames, nextBRef, curNonB, i);<br>
}<br>
else<br>
- satdCost = vbvFrameCost(frames, prevNonB, nextNonB, i);<br>
+ satdCost = vbvFrameCost(frames, prevNonB, curNonB, i);<br>
frames[nextNonB]->plannedSatd[idx] = satdCost;<br>
frames[nextNonB]->plannedType[idx] = type;<br>
/* Save the nextB Cost in each B frame of the current miniGop */<br>
<div class="HOEnZb"><div class="h5"><br>
for (int j = nextB; j < miniGopEnd; j++)<br>
{<br>
- if (nextBRef && i == nextBRef)<br>
+ if (curBRef && curBRef == i)<br>
break;<br>
if (j >= i && j !=nextBRef)<br>
continue;<br>
frames[j]->plannedSatd[frames[j]->indB] = satdCost;<br>
- frames[j]->plannedType[frames[j]->indB++] = X265_TYPE_B;<br>
+ frames[j]->plannedType[frames[j]->indB++] = type;<br>
}<br>
}<br>
prevNonB = curNonB;<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>
</div></div></blockquote></div><br></div>