[x265-commits] [x265] quant: update comment for UNQUANT macro

Steve Borho steve at borho.org
Thu Aug 14 06:24:12 CEST 2014


details:   http://hg.videolan.org/x265/rev/7c7d35fe1a14
branches:  
changeset: 7784:7c7d35fe1a14
user:      Steve Borho <steve at borho.org>
date:      Wed Aug 13 23:23:57 2014 -0500
description:
quant: update comment for UNQUANT macro

diffstat:

 source/common/quant.cpp |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (18 lines):

diff -r 9ad7668756f7 -r 7c7d35fe1a14 source/common/quant.cpp
--- a/source/common/quant.cpp	Wed Aug 13 15:46:39 2014 -0500
+++ b/source/common/quant.cpp	Wed Aug 13 23:23:57 2014 -0500
@@ -495,11 +495,9 @@ uint32_t Quant::rdoQuant(TComDataCU* cu,
 
     uint32_t trSize = 1 << log2TrSize;
 
-    /* unquant constants for psy-rdoq. The dequant coefficients have a (1<<4) scale applied that
-     * must be removed during unquant.  This may be larger than the QP upshift, which would turn
-     * some shifts around. To avoid this we add an addition shift factor to the dequant coeff.  Note
-     * that in real dequant there is clipping at several stages. We skip the clipping when measuring
-     * RD cost */
+    /* unquant constants for measuring distortion. Sscaling list quant coefficients have a (1 << 4)
+     * scale applied that must be removed during unquant. Note that in real dequant there is clipping
+     * at several stages. We skip the clipping when measuring RD cost */
 #define UNQUANT(lvl) (((lvl) * (unquantScale[blkPos] << per) + unquantRound) >> unquantShift)
     int32_t *unquantScale = m_scalingList->m_dequantCoef[log2TrSize - 2][scalingListType][rem];
     int unquantShift = QUANT_IQUANT_SHIFT - QUANT_SHIFT - transformShift + m_scalingList->m_bEnabled ? 4 : 0;


More information about the x265-commits mailing list