[x265] [PATCH 2 of 2] function call for rateControlStart and End - enabled only in ABR mode fopr now
Steve Borho
steve at borho.org
Thu Aug 22 21:46:26 CEST 2013
On Thu, Aug 22, 2013 at 2:30 PM, <aarthi at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Aarthi<aarthi at multicorewareinc.com>
> # Date 1377199779 -19800
> # Fri Aug 23 00:59:39 2013 +0530
> # Node ID d633a649e2d6297d515e0260a61b6d6d0f0d3ae7
> # Parent 41f20253a3b8f7b8aae5d83cb563af919249c0fc
> function call for rateControlStart and End - enabled only in ABR mode
> fopr now
>
> diff -r 41f20253a3b8 -r d633a649e2d6 source/Lib/TLibEncoder/TEncTop.cpp
> --- a/source/Lib/TLibEncoder/TEncTop.cpp Fri Aug 23 00:58:28 2013
> +0530
> +++ b/source/Lib/TLibEncoder/TEncTop.cpp Fri Aug 23 00:59:39 2013
> +0530
> @@ -249,8 +249,11 @@
> // determine references, set QP, etc
> m_dpb->prepareEncode(fenc, curEncoder);
>
> - //m_lookahead->getEstimatedPictureCost(fenc); // TODO: move into
> rate control
> - //m_rateControl->rateControlStart(fenc);
> + // m_lookahead->getEstimatedPictureCost(fenc); // TODO: move into
> rate control
> + if(m_rateControl->rateControlMode == X265_RC_ABR)
> + {
> + m_rateControl->rateControlStart(fenc);
> + }
>
this is an abstraction layer violation. The function should early-out if
the mode is not ABR.
Also, be careful with white-space: if (expr)
>
> // main encode processing, TBD multi-threading
> curEncoder->compressFrame(fenc);
> @@ -530,7 +533,11 @@
> {
> m_analyzeB.addResult(psnrY, psnrU, psnrV, (Double)bits);
> }
> - m_rateControl->rateControlEnd(bits);
> + //Rate control End is called here for now, as it needs encoded
> bits for each frame only as input
> + if(m_rateControl->rateControlMode == X265_RC_ABR)
> + {
> + m_rateControl->rateControlEnd(bits);
> + }
>
it would probably be cleaner for this function to return the bit count so
the start/stop rate control calls can be kept in the same function.
> if (param.logLevel >= X265_LOG_DEBUG)
> {
> Char c = (slice->isIntra() ? 'I' : slice->isInterP() ? 'P' : 'B');
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
--
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.videolan.org/private/x265-devel/attachments/20130822/94c92fe9/attachment.html>
More information about the x265-devel
mailing list