<div dir="ltr">no, there were a few conflicts because my local tip wasn't updated. Sending again..</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 8:02 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 01/07, <a href="mailto:aarthi@multicorewareinc.com">aarthi@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Aarthi Thirumalai<br>
> # Date 1419064540 -19800<br>
> # Sat Dec 20 14:05:40 2014 +0530<br>
> # Node ID 5d658640bcf115f2add4da1619eeaec50177973f<br>
> # Parent 9b30c4b16dfc4c673b57ee4c567fa8956a41e2fc<br>
> rc: restrict low tolerance for bitrate fluctuations to strict-cbr option<br>
<br>
</span>this patch isn't applying; perhaps it depends on the RCstart/stop patch<br>
<div><div class="h5"><br>
> diff -r 9b30c4b16dfc -r 5d658640bcf1 source/encoder/ratecontrol.cpp<br>
> --- a/source/encoder/ratecontrol.cpp Tue Dec 23 16:32:30 2014 +0530<br>
> +++ b/source/encoder/ratecontrol.cpp Sat Dec 20 14:05:40 2014 +0530<br>
> @@ -1759,7 +1759,7 @@<br>
> for (int j = 0; bufferFillCur >= 0; j++)<br>
> {<br>
> int type = curFrame->m_lowres.plannedType[j];<br>
> - if (type == X265_TYPE_AUTO)<br>
> + if (type == X265_TYPE_AUTO || totalDuration >= 1.0)<br>
> break;<br>
> totalDuration += m_frameDuration;<br>
> double wantedFrameSize = m_vbvMaxRate * m_frameDuration;<br>
> @@ -1773,17 +1773,21 @@<br>
> bufferFillCur -= curBits;<br>
> }<br>
><br>
> - /* Try to get the buffer no more than 80% filled, but don't set an impossible goal. */<br>
> - double tol = isIFramePresent ? 1 / totalDuration : totalDuration < 0.5 ? 2 : 1;<br>
> - targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5 , m_bufferSize * (1 - 0.8 * totalDuration * tol));<br>
> + /* Try to get the buffer at least 50% filled, but don't set an impossible goal. */<br>
> + double finalDur = 1;<br>
> + if (m_param->rc.bStrictCbr)<br>
> + {<br>
> + finalDur = Clip3(0.4, 1.0, totalDuration);<br>
> + }<br>
> + targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5 , m_bufferSize * (1 - 0.5 * finalDur));<br>
> if (bufferFillCur < targetFill)<br>
> {<br>
> q *= 1.01;<br>
> loopTerminate |= 1;<br>
> continue;<br>
> }<br>
> - /* Try to get the buffer atleast 50% filled, but don't set an impossible goal. */<br>
> - targetFill = Clip3(m_bufferSize - (m_bufferSize * totalDuration * 0.5), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5);<br>
> + /* Try to get the buffer not more than 80% filled, but don't set an impossible goal. */<br>
> + targetFill = Clip3(m_bufferSize * (1 - 0.2 * finalDur) , m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5);<br>
> if (m_isCbr && bufferFillCur > targetFill)<br>
> {<br>
> q /= 1.01;<br>
> @@ -1976,7 +1980,7 @@<br>
> if (row < sps.numCuInHeight - 1)<br>
> {<br>
> /* More threads means we have to be more cautious in letting ratecontrol use up extra bits. */<br>
> - double rcTol = (bufferLeftPlanned * 0.2) / m_param->frameNumThreads * m_param->rc.rateTolerance;<br>
> + double rcTol = bufferLeftPlanned / m_param->frameNumThreads * m_param->rc.rateTolerance;<br>
> int32_t encodedBitsSoFar = 0;<br>
> double accFrameBits = predictRowsSizeSum(curFrame, rce, qpVbv, encodedBitsSoFar);<br>
><br>
> @@ -1994,7 +1998,7 @@<br>
><br>
> while (qpVbv < qpMax<br>
> && ((accFrameBits > rce->frameSizePlanned + rcTol) ||<br>
> - (rce->bufferFill - accFrameBits < bufferLeftPlanned * 0.2) ||<br>
> + (rce->bufferFill - accFrameBits < bufferLeftPlanned * 0.5) ||<br>
> (accFrameBits > rce->frameSizePlanned && qpVbv < rce->qpNoVbv)))<br>
> {<br>
> qpVbv += stepSize;<br>
</div></div>> _______________________________________________<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>
<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" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</font></span></blockquote></div><br></div>