[x265] [PATCH] rc: correct the threshold for resetABR function

Deepthi Nandakumar deepthi at multicorewareinc.com
Thu Oct 2 04:21:55 CEST 2014


Thanks, this is the right patch. Steve, can you pls push this logic? My
internet connection gave up on me right after I pushed the wrong one - talk
about luck
On Oct 2, 2014 12:47 AM, <aarthi at multicorewareinc.com> wrote:
>
> # HG changeset patch
> # User Aarthi Thirumalai
> # Date 1412190970 -19800
> #      Thu Oct 02 00:46:10 2014 +0530
> # Node ID 715f6cd617955e1e6100653e224e4a294d369f69
> # Parent  07b9168a967236e84abe2decf3f26bab463f9d89
> rc: correct the threshold for resetABR function
>
> diff -r 07b9168a9672 -r 715f6cd61795 source/encoder/ratecontrol.cpp
> --- a/source/encoder/ratecontrol.cpp    Thu Oct 02 00:14:13 2014 +0530
> +++ b/source/encoder/ratecontrol.cpp    Thu Oct 02 00:46:10 2014 +0530
> @@ -1620,9 +1620,9 @@
>          if (!m_isAbrReset && rce->movingAvgSum > 0)
>          {
>              // Reset ABR if prev frames are blank to prevent further
sudden overflows/ high bit rate spikes.
> -            double underflow = 1.0 + (m_totalBits - m_wantedBitsWindow)
/ abrBuffer;
> -            const float epsilon = 0.1f;
> -            if (fabs (underflow - 0.9f) < epsilon && !isFrameDone)
> +            double underflow = (m_totalBits - m_wantedBitsWindow) /
abrBuffer;
> +            const double epsilon = 0.0001f;
> +            if (underflow < epsilon && !isFrameDone)
>              {
>                  init(m_curSlice->m_sps);
>                  m_shortTermCplxSum = rce->lastSatd /
(CLIP_DURATION(m_frameDuration) / BASE_FRAME_DURATION);
> _______________________________________________
> 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/20141002/2ac1308d/attachment.html>


More information about the x265-devel mailing list