[x265] [PATCH RFC] 1. Bug fix - improved quality drop for low resolution videos in ABR by 5%

Aarthi Priya Thirumalai aarthi at multicorewareinc.com
Fri Sep 13 12:50:35 CEST 2013


On Thu, Sep 12, 2013 at 9:42 PM, Derek Buitenhuis <
derek.buitenhuis at gmail.com> wrote:

> On 9/12/2013 12:46 PM, sumalatha at multicorewareinc.com wrote:
> > # HG changeset patch
> > # User sumalatha polureddy
> > # Date 1378986299 -19800
> > # Node ID f8ac7c593a80639220d4c445167383fdaad48dc8
> > # Parent  8fdafe573ef7bc2f9ca3eab968f5a563aa06ac54
> > 1. Bug fix - improved quality drop for low resolution videos in ABR by 5%
> >   - Clipped the qp for the 1st frame to improve quality.
> > 2. Changed tuning factors in rateControlEnd from 1.1 to 1.5
> >  -  to tune up the actual bits else the cplxrSum is scaled too low to
> improve short term compensation.
>
> You should wrap long lines in commit messages, and also have a title line.
>
> Suggestion:
>
>     ratecontrol: Tweak to better handle short term compensation
>
>     Increase the coefficient cplxrSum is adjusted by so that short term
>     compensation does not suffer as much.
>
>     Also, clip the QP for the first frame.
>
>     Overall improvement is about 5%.
>
> > +        //introduced to margin QP for first frame to an optimum level
> in order to stabilize the quality.
>
> English fix:
>
>     // Adjust the first frame in order to stabilize the quality level
> compared to the rest.
>
> > -        accumPQp = (ABR_INIT_QP)*accumPNorm;
> > +        ccumPQp = (ABR_INIT_QP_MIN)*accumPNorm;
>
> Should really have spaces around the asterisk for consistency.
>
> > -        cplxrSum = .01 * pow(7.0e5, qCompress) * pow(2 *ncu, 0.5);
> > +        cplxrSum = .01 * pow(7.0e5, qCompress) * pow(2 * ncu, 0.5);
>
> Unrelated changed, technically.
>
> > +        if (prevRefSlice->getSliceType()  == B_SLICE &&
> prevRefSlice->isReferenced())
> > +            q0 -= pbOffset / 2;
> > +        if (nextRefSlice->getSliceType()  == B_SLICE &&
> nextRefSlice->isReferenced())
> > +            q1 -= pbOffset / 2;
>
> Still extra whitespace before the '=='.
>
> > -
> > -        double qScale = qp2qScale(q);
> >
> > -        lastQScaleFor[P_SLICE] = lastQScale = qScale/pbFactor;
> > -
> > -        return qScale;
> > +        return qp2qScale(q);
>
> Still not entirely sure why this is done....
>
> The patch is OK on a technical level, I think, though I still do not
> understand the above change.
>

 The qscale values are clipped(for P frames)  depending on the
lastQScaleFor[] at the end to ensure qps dont increase too high/low. they
are updated in rateEstimateQScale for non B frames. The above change was
introduced so that qp for P frames can adapt based on the qp of  preceding
B frames  too -  to see if its improves RateControl. Since it didnt give
any big improvements, removing the change.

>
> - Derek
> _______________________________________________
> 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/20130913/c7e0f663/attachment.html>


More information about the x265-devel mailing list