[x265] [PATCH] csv: print the correct value for BufferFill column in csv
Pradeep Ramachandran
pradeep at multicorewareinc.com
Thu Apr 20 01:12:27 CEST 2017
On Wed, Apr 12, 2017 at 10:05 PM, <gopi.satykrishna at multicorewareinc.com>
wrote:
> # HG changeset patch
> # User Gopi Satykrishna Akisetty <gopi.satykrishna at multicorewareinc.com>
> # Date 1491978866 -19800
> # Wed Apr 12 12:04:26 2017 +0530
> # Node ID 8e1f2e00dd9d2f7af2904f1774fc87a254ee36ea
> # Parent 0b7d54dbb71a87a0c6514fee04a51c4b29d5d704
> csv: print the correct value for BufferFill column in csv
>
Pushed to default branch. Sorry for the delay.
>
> diff -r 0b7d54dbb71a -r 8e1f2e00dd9d source/encoder/ratecontrol.cpp
> --- a/source/encoder/ratecontrol.cpp Wed Apr 12 19:01:00 2017 +0530
> +++ b/source/encoder/ratecontrol.cpp Wed Apr 12 12:04:26 2017 +0530
> @@ -2550,25 +2550,25 @@
> m_bufferFillFinal = X265_MAX(m_bufferFillFinal, 0);
> m_bufferFillFinal += m_bufferRate;
>
> - if (m_bufferFillFinal > m_bufferSize)
> + if (m_param->rc.bStrictCbr)
> {
> - if (m_param->rc.bStrictCbr)
> + if (m_bufferFillFinal > m_bufferSize)
> {
> filler = (int)(m_bufferFillFinal - m_bufferSize);
> filler += FILLER_OVERHEAD * 8;
> - m_bufferFillFinal -= filler;
> - bufferBits = X265_MIN(bits + filler + m_bufferExcess,
> m_bufferRate);
> - m_bufferExcess = X265_MAX(m_bufferExcess - bufferBits + bits
> + filler, 0);
> - m_bufferFillActual += bufferBits - bits - filler;
> }
> - else
> - {
> - m_bufferFillFinal = X265_MIN(m_bufferFillFinal, m_bufferSize);
> - bufferBits = X265_MIN(bits + m_bufferExcess, m_bufferRate);
> - m_bufferExcess = X265_MAX(m_bufferExcess - bufferBits + bits,
> 0);
> - m_bufferFillActual += bufferBits - bits;
> - m_bufferFillActual = X265_MIN(m_bufferFillActual,
> m_bufferSize);
> - }
> + m_bufferFillFinal -= filler;
> + bufferBits = X265_MIN(bits + filler + m_bufferExcess,
> m_bufferRate);
> + m_bufferExcess = X265_MAX(m_bufferExcess - bufferBits + bits +
> filler, 0);
> + m_bufferFillActual += bufferBits - bits - filler;
> + }
> + else
> + {
> + m_bufferFillFinal = X265_MIN(m_bufferFillFinal, m_bufferSize);
> + bufferBits = X265_MIN(bits + m_bufferExcess, m_bufferRate);
> + m_bufferExcess = X265_MAX(m_bufferExcess - bufferBits + bits, 0);
> + m_bufferFillActual += bufferBits - bits;
> + m_bufferFillActual = X265_MIN(m_bufferFillActual, m_bufferSize);
> }
> return filler;
> }
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170419/1644c3a3/attachment.html>
More information about the x265-devel
mailing list