[x265] [PATCH RFC] 1. Bug fix - improved quality drop for low resolution videos in ABR by 5%
Derek Buitenhuis
derek.buitenhuis at gmail.com
Thu Sep 12 18:12:16 CEST 2013
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.
- Derek
More information about the x265-devel
mailing list