[x265-commits] [x265] param: initialise lossless/cu-lossless fields to zero

Deepthi Nandakumar deepthi at multicorewareinc.com
Tue Jun 3 22:34:50 CEST 2014


details:   http://hg.videolan.org/x265/rev/7153905d56e6
branches:  stable
changeset: 6960:7153905d56e6
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jun 03 13:31:04 2014 +0530
description:
param: initialise lossless/cu-lossless fields to zero
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/d3f55d391314
branches:  
changeset: 6961:d3f55d391314
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jun 03 16:01:08 2014 +0530
description:
Merge with stable
Subject: [x265] rest: correct documentation on AQ

details:   http://hg.videolan.org/x265/rev/f66ad1400874
branches:  stable
changeset: 6962:f66ad1400874
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jun 03 16:13:52 2014 +0530
description:
rest: correct documentation on AQ
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/d78f38b707ba
branches:  
changeset: 6963:d78f38b707ba
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jun 03 16:15:32 2014 +0530
description:
Merge with stable
Subject: [x265] cli: seperate new lossless options, make --lossless description more concise

details:   http://hg.videolan.org/x265/rev/cfab9513e27c
branches:  stable
changeset: 6964:cfab9513e27c
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 09:49:30 2014 -0500
description:
cli: seperate new lossless options, make --lossless description more concise

try to avoid having the --lossless line wrap
Subject: [x265] xp: avoid compiler warning from GCC-MinGW

details:   http://hg.videolan.org/x265/rev/d315d1430f5c
branches:  stable
changeset: 6965:d315d1430f5c
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 09:55:13 2014 -0500
description:
xp: avoid compiler warning from GCC-MinGW

MSVC gives a warning at link time if this file is empty, so I added a useless
variable to the file. GCC-MinGW issues a compile time warning about this
unused variable.
Subject: [x265] qp: remove Encoder::m_useLossless.

details:   http://hg.videolan.org/x265/rev/b4e87638e5cc
branches:  stable
changeset: 6966:b4e87638e5cc
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jun 03 16:07:22 2014 +0530
description:
qp: remove Encoder::m_useLossless.

This patch removes confusion between Encoder::m_useLossless and x265_param::bUseLossless.
m_useLossless was set whenever qp = 0, and used in TComSPS. qp = 0  is still a valid
encoder option.
Subject: [x265] SEI: Insert buffering period and picture timing SEI messages

details:   http://hg.videolan.org/x265/rev/f9f553c8bd6a
branches:  
changeset: 6967:f9f553c8bd6a
user:      Kavitha Sampath <kavitha at multicorewareinc.com>
date:      Tue Jun 03 18:03:15 2014 +0530
description:
SEI: Insert buffering period and picture timing SEI messages

The buffering period SEI message is inserted for every key frame and the
picture timing SEI is inserted for every frame. The commit also computes the
HRD parameters as well as HRD Timing parameters that are calculated using the
delay components(cpb removal delay and dpb output delay) carried in these
SEI messages. HRD parameters can be signalled by enabling --hrd.
Subject: [x265] SEI: only setup SEIPictureTiming fields which will be coded

details:   http://hg.videolan.org/x265/rev/3356ce23cad2
branches:  
changeset: 6968:3356ce23cad2
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 10:32:48 2014 -0500
description:
SEI: only setup SEIPictureTiming fields which will be coded
Subject: [x265] TComSlice: nit - use bools to initialize bools

details:   http://hg.videolan.org/x265/rev/8b5dadb1454e
branches:  
changeset: 6969:8b5dadb1454e
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 10:34:11 2014 -0500
description:
TComSlice: nit - use bools to initialize bools
Subject: [x265] whitespace clean-up

details:   http://hg.videolan.org/x265/rev/8c66560a3e23
branches:  
changeset: 6970:8c66560a3e23
user:      Praveen Tiwari
date:      Tue Jun 03 13:36:12 2014 +0530
description:
whitespace clean-up
Subject: [x265] x265.h, data declaration alignment

details:   http://hg.videolan.org/x265/rev/6f3149d95bd9
branches:  
changeset: 6971:6f3149d95bd9
user:      Praveen Tiwari
date:      Tue Jun 03 14:02:06 2014 +0530
description:
x265.h, data declaration alignment
Subject: [x265] lossless: disable rate control, force QP=4

details:   http://hg.videolan.org/x265/rev/12d35ab8148d
branches:  stable
changeset: 6972:12d35ab8148d
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 13:40:36 2014 -0500
description:
lossless: disable rate control, force QP=4

strangely enough, using QP=4 gives better lambda for lossless ME and RD
decisions
Subject: [x265] lossless: report compression ratio, disable distortion metrics

details:   http://hg.videolan.org/x265/rev/d9facf9895f7
branches:  stable
changeset: 6973:d9facf9895f7
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 14:20:43 2014 -0500
description:
lossless: report compression ratio, disable distortion metrics
Subject: [x265] lossless: do not allow CQP to adjust QP for I/B when encoding lossless

details:   http://hg.videolan.org/x265/rev/07e7a54ae1cb
branches:  stable
changeset: 6974:07e7a54ae1cb
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 14:21:16 2014 -0500
description:
lossless: do not allow CQP to adjust QP for I/B when encoding lossless
Subject: [x265] param: only log psy-rd if it is enabled

details:   http://hg.videolan.org/x265/rev/ae9609aeebdc
branches:  stable
changeset: 6975:ae9609aeebdc
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 14:33:39 2014 -0500
description:
param: only log psy-rd if it is enabled
Subject: [x265] Added tag 1.1 for changeset ae9609aeebdc

details:   http://hg.videolan.org/x265/rev/2650fdd1a7f6
branches:  stable
changeset: 6976:2650fdd1a7f6
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 15:14:57 2014 -0500
description:
Added tag 1.1 for changeset ae9609aeebdc
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/f2479eb454b0
branches:  
changeset: 6977:f2479eb454b0
user:      Steve Borho <steve at borho.org>
date:      Tue Jun 03 15:24:22 2014 -0500
description:
Merge with stable

diffstat:

 .hgtags                                |    1 +
 doc/reST/cli.rst                       |   13 +-
 doc/reST/presets.rst                   |    2 +-
 source/CMakeLists.txt                  |    2 +-
 source/Lib/TLibCommon/SEI.h            |    9 +-
 source/Lib/TLibCommon/TComPic.h        |    3 +
 source/Lib/TLibCommon/TComSlice.cpp    |    1 -
 source/Lib/TLibCommon/TComSlice.h      |   19 +-
 source/Lib/TLibEncoder/TEncEntropy.cpp |    1 -
 source/Lib/TLibEncoder/TEncEntropy.h   |    1 -
 source/Lib/TLibEncoder/TEncSbac.cpp    |    5 +-
 source/Lib/TLibEncoder/TEncSearch.cpp  |  442 +++++++++++++++-----------------
 source/common/param.cpp                |    6 +-
 source/common/primitives.cpp           |   47 +++
 source/common/primitives.h             |    4 +
 source/common/winxp.cpp                |    2 +-
 source/common/x86/asm-primitives.cpp   |   33 --
 source/encoder/encoder.cpp             |   54 ++--
 source/encoder/encoder.h               |    5 +-
 source/encoder/frameencoder.cpp        |   94 +++++-
 source/encoder/ratecontrol.cpp         |  214 +++++++++++++--
 source/encoder/ratecontrol.h           |   14 +-
 source/x265.cpp                        |   11 +-
 source/x265.h                          |   14 +-
 24 files changed, 613 insertions(+), 384 deletions(-)

diffs (truncated from 2023 to 300 lines):

diff -r 108996798e78 -r f2479eb454b0 .hgtags
--- a/.hgtags	Mon Jun 02 14:23:09 2014 -0500
+++ b/.hgtags	Tue Jun 03 15:24:22 2014 -0500
@@ -12,3 +12,4 @@ d24e2a8c4326b0cd01bfa6c414c5378481af9018
 527d03c56d6860dc979ddea1196f7e94d13d3e82 0.8
 82bbd2bf3b49ba086be0f0922f91fe0084896351 0.9
 cea97c4d79456842e00ade6be6fd5ec34610e5f8 1.0
+ae9609aeebdc3271114168ece003679e9b1dca1b 1.1
diff -r 108996798e78 -r f2479eb454b0 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Jun 02 14:23:09 2014 -0500
+++ b/doc/reST/cli.rst	Tue Jun 03 15:24:22 2014 -0500
@@ -604,7 +604,11 @@ Quality, rate control and rate distortio
 
 	Enables true lossless coding by bypassing scaling, transform,
 	quantization and in-loop filter processes. This is used for
-	ultra-high bitrates with zero loss of quality. Default disabled.
+	ultra-high bitrates with zero loss of quality. Reconstructed output
+	pictures are bit-exact to the input pictures. Lossless encodes
+	implicitly have no rate control, all rate control options are
+	ignored. Slower presets will generally achieve better compression
+	efficiency (and generate smaller bitstreams). Default disabled.
 
 .. option:: --aq-mode <0|1|2>
 
@@ -858,6 +862,13 @@ Bitstream options
 	to keep the stream headers for you and you want keyframes to be
 	random access points. Default disabled
 
+.. option:: --hrd, --no-hrd
+
+	Enable the signalling of HRD parameters to the decoder. The HRD
+	parameters are carried by the Buffering Period SEI messages and
+	Picture Timing SEI messages providing timing information to the
+	decoder. Default disabled
+
 .. option:: --aud, --no-aud
 
 	Emit an access unit delimiter NAL at the start of each slice access
diff -r 108996798e78 -r f2479eb454b0 doc/reST/presets.rst
--- a/doc/reST/presets.rst	Mon Jun 02 14:23:09 2014 -0500
+++ b/doc/reST/presets.rst	Tue Jun 03 15:24:22 2014 -0500
@@ -54,7 +54,7 @@ The presets adjust encoder parameters to
 +--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
 | weightp      |    0      |     0     |    1     |   1    |  1   |    1   |  1   |   1    |    1     |    1    |
 +--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
-| aq-mode      |    0      |     0     |    1     |   1    |  1   |    1   |  1   |   1    |    1     |    1    |
+| aq-mode      |    0      |     0     |    2     |   2    |  2   |    2   |  2   |   2    |    2     |    2    |
 +--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
 | cuTree       |    0      |     0     |    0     |   0    |  1   |    1   |  1   |   1    |    1     |    1    |
 +--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
diff -r 108996798e78 -r f2479eb454b0 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/CMakeLists.txt	Tue Jun 03 15:24:22 2014 -0500
@@ -19,7 +19,7 @@ include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 21)
+set(X265_BUILD 22)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibCommon/SEI.h
--- a/source/Lib/TLibCommon/SEI.h	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibCommon/SEI.h	Tue Jun 03 15:24:22 2014 -0500
@@ -185,14 +185,7 @@ public:
 
     PayloadType payloadType() const { return PICTURE_TIMING; }
 
-    SEIPictureTiming()
-        : m_picStruct(0)
-        , m_sourceScanType(0)
-        , m_duplicateFlag(false)
-        , m_picDpbOutputDuDelay(0)
-        , m_numNalusInDuMinus1(NULL)
-        , m_duCpbRemovalDelayMinus1(NULL)
-    {}
+    SEIPictureTiming() {}
 
     virtual ~SEIPictureTiming()
     {
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibCommon/TComPic.h
--- a/source/Lib/TLibCommon/TComPic.h	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibCommon/TComPic.h	Tue Jun 03 15:24:22 2014 -0500
@@ -45,6 +45,7 @@
 #include "lowres.h"
 #include "threading.h"
 #include "md5.h"
+#include "SEI.h"
 
 namespace x265 {
 // private namespace
@@ -120,6 +121,8 @@ public:
     double                m_avgQpAq;    // avg QP as decided by AQ in addition to ratecontrol
     double                m_rateFactor; // calculated based on the Frame QP
     int32_t               m_forceqp;    // Force to use the qp specified in qp file
+    SEIPictureTiming      m_sei;
+    HRDTiming             m_hrdTiming;
 
     TComPic();
     virtual ~TComPic();
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Jun 03 15:24:22 2014 -0500
@@ -487,7 +487,6 @@ TComSPS::TComSPS()
     , m_bitDepthC(8)
     , m_qpBDOffsetY(0)
     , m_qpBDOffsetC(0)
-    , m_useLossless(false)
     , m_pcmBitDepthLuma(8)
     , m_pcmBitDepthChroma(8)
     , m_bPCMFilterDisableFlag(false)
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Jun 03 15:24:22 2014 -0500
@@ -311,8 +311,8 @@ private:
 public:
 
     TComHRD()
-        : m_nalHrdParametersPresentFlag(0)
-        , m_vclHrdParametersPresentFlag(0)
+        : m_nalHrdParametersPresentFlag(false)
+        , m_vclHrdParametersPresentFlag(false)
         , m_subPicHrdParamsPresentFlag(false)
         , m_tickDivisorMinus2(0)
         , m_duCpbRemovalDelayLengthMinus1(0)
@@ -460,6 +460,14 @@ public:
     void setNumTicksPocDiffOneMinus1(int x)     { m_numTicksPocDiffOneMinus1 = x; }
 };
 
+struct HRDTiming
+{
+    double cpbInitialAT;
+    double cpbFinalAT;
+    double dpbOutputTime;
+    double cpbRemovalTime;
+};
+
 class TComVPS
 {
 private:
@@ -816,8 +824,6 @@ private:
     int         m_qpBDOffsetY;
     int         m_qpBDOffsetC;
 
-    bool        m_useLossless;
-
     uint32_t    m_pcmBitDepthLuma;
     uint32_t    m_pcmBitDepthChroma;
     bool        m_bPCMFilterDisableFlag;
@@ -973,11 +979,6 @@ public:
 
     uint32_t getMaxTrSize() const   { return m_maxTrSize; }
 
-    // Tool list
-    bool getUseLossless() const { return m_useLossless; }
-
-    void setUseLossless(bool b) { m_useLossless  = b; }
-
     // AMP accuracy
     int       getAMPAcc(uint32_t depth) const { return m_iAMPAcc[depth]; }
 
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibEncoder/TEncEntropy.cpp
--- a/source/Lib/TLibEncoder/TEncEntropy.cpp	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncEntropy.cpp	Tue Jun 03 15:24:22 2014 -0500
@@ -202,7 +202,6 @@ bool TEncEntropy::isNextTUSection(TComTU
 
 void TEncEntropy::initTUEntropySection(TComTURecurse *tuIterator, uint32_t splitMode, uint32_t absPartIdxStep, uint32_t m_absPartIdxTU)
 {
-    tuIterator->m_partOffset        = 0;
     tuIterator->m_section           = 0;
     tuIterator->m_absPartIdxTURelCU = m_absPartIdxTU;
     tuIterator->m_splitMode         = splitMode;
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibEncoder/TEncEntropy.h
--- a/source/Lib/TLibEncoder/TEncEntropy.h	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncEntropy.h	Tue Jun 03 15:24:22 2014 -0500
@@ -66,7 +66,6 @@ struct TComTURecurse
     uint32_t          m_splitMode;
     uint32_t          m_absPartIdxTURelCU;
     uint32_t          m_absPartIdxStep;
-    uint32_t          m_partOffset;
 };
 
 // ====================================================================================================================
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Tue Jun 03 15:24:22 2014 -0500
@@ -2120,8 +2120,9 @@ void TEncSbac::codeCoeffNxN(TComDataCU* 
     // compute number of significant coefficients
     uint32_t numSig = primitives.count_nonzero(coeff, trSize * trSize);
 
-    if (numSig == 0)
-        return;
+#if CHECKED_BUILD || _DEBUG
+    X265_CHECK(numSig > 0, "cbf check fail");
+#endif
 
     bool beValid;
     if (cu->getCUTransquantBypass(absPartIdx))
diff -r 108996798e78 -r f2479eb454b0 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Mon Jun 02 14:23:09 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Jun 03 15:24:22 2014 -0500
@@ -408,8 +408,8 @@ void TEncSearch::xIntraCodingLumaBlk(TCo
     coeff_t* coeff          = m_qtTempCoeff[0][qtLayer] + coeffOffsetY;
 
     int16_t* reconQt        = m_qtTempShortYuv[qtLayer].getLumaAddr(absPartIdx);
-
     X265_CHECK(m_qtTempShortYuv[qtLayer].m_width == MAX_CU_SIZE, "width is not max CU size\n");
+    const uint32_t reconQtStride = MAX_CU_SIZE;
 
     uint32_t zorder           = cu->getZorderIdxInCU() + absPartIdx;
     pixel*   reconIPred       = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), zorder);
@@ -443,25 +443,29 @@ void TEncSearch::xIntraCodingLumaBlk(TCo
     //--- set coded block flag ---
     cu->setCbfSubParts((absSum ? 1 : 0) << trDepth, TEXT_LUMA, absPartIdx, fullDepth);
 
-    //--- inverse transform ---
     if (absSum)
     {
+        //--- inverse transform ---
         int scalingListType = 0 + TEXT_LUMA;
-        X265_CHECK(scalingListType < 6, "scalingListType is too large %d\n", scalingListType);
+        X265_CHECK(scalingListType < 6, "scalingListType invalid %d\n", scalingListType);
         m_trQuant->invtransformNxN(cu->getCUTransquantBypass(absPartIdx), cu->getLumaIntraDir(absPartIdx), residual, stride, coeff, tuSize, scalingListType, useTransformSkip, lastPos);
+        X265_CHECK(tuSize <= 32, "tuSize is too large %d\n", tuSize);
+        //===== reconstruction =====
+        primitives.calcrecon[sizeIdx](pred, residual, reconQt, reconIPred, stride, reconQtStride, reconIPredStride);
+        //===== update distortion =====
+        outDist += primitives.sse_sp[part](reconQt, reconQtStride, fenc, stride);
     }
     else
     {
-        int16_t* resiTmp = residual;
+#if CHECKED_BUILD || _DEBUG
         memset(coeff, 0, sizeof(coeff_t) * tuSize * tuSize);
-        primitives.blockfill_s[sizeIdx](resiTmp, stride, 0);
+#endif
+        //===== reconstruction =====
+        primitives.luma_copy_ps[part](reconQt,    reconQtStride,    pred, stride);
+        primitives.luma_copy_pp[part](reconIPred, reconIPredStride, pred, stride);
+        //===== update distortion =====
+        outDist += primitives.sse_pp[part](pred, stride, fenc, stride);
     }
-
-    X265_CHECK(tuSize <= 32, "tuSize is too large %d\n", tuSize);
-    //===== reconstruction =====
-    primitives.calcrecon[sizeIdx](pred, residual, reconQt, reconIPred, stride, MAX_CU_SIZE, reconIPredStride);
-    //===== update distortion =====
-    outDist += primitives.sse_sp[part](reconQt, MAX_CU_SIZE, fenc, stride);
 }
 
 void TEncSearch::xIntraCodingChromaBlk(TComDataCU* cu,
@@ -519,67 +523,67 @@ void TEncSearch::xIntraCodingChromaBlk(T
     primitives.calcresidual[sizeIdx](fenc, pred, residual, stride);
 
     //===== transform and quantization =====
+    //--- init rate estimation arrays for RDOQ ---
+    if (useTransformSkipChroma ? m_cfg->bEnableRDOQTS : m_cfg->bEnableRDOQ)
     {
-        //--- init rate estimation arrays for RDOQ ---
-        if (useTransformSkipChroma ? m_cfg->bEnableRDOQTS : m_cfg->bEnableRDOQ)
-        {
-            m_entropyCoder->estimateBit(m_trQuant->m_estBitsSbac, tuSize, ttype);
-        }
-        //--- transform and quantization ---
-        uint32_t absSum = 0;
-        int lastPos = -1;
-
-        int curChromaQpOffset;
-        if (ttype == TEXT_CHROMA_U)
-        {
-            curChromaQpOffset = cu->getSlice()->getPPS()->getChromaCbQpOffset() + cu->getSlice()->getSliceQpDeltaCb();
-        }
-        else
-        {
-            curChromaQpOffset = cu->getSlice()->getPPS()->getChromaCrQpOffset() + cu->getSlice()->getSliceQpDeltaCr();
-        }
-        m_trQuant->setQPforQuant(cu->getQP(0), TEXT_CHROMA, cu->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset, chFmt);
-
-        m_trQuant->selectLambda(TEXT_CHROMA);
-
-        absSum = m_trQuant->transformNxN(cu, residual, stride, coeff, tuSize, ttype, absPartIdx, &lastPos, useTransformSkipChroma);
-
-        //--- set coded block flag ---
-        cu->setCbfPartRange((((absSum > 0) ? 1 : 0) << origTrDepth), ttype, absPartIdx, absPartIdxStep);
-
+        m_entropyCoder->estimateBit(m_trQuant->m_estBitsSbac, tuSize, ttype);
+    }
+
+    //--- transform and quantization ---
+    uint32_t absSum = 0;
+    int lastPos = -1;
+
+    int curChromaQpOffset;
+    if (ttype == TEXT_CHROMA_U)
+    {
+        curChromaQpOffset = cu->getSlice()->getPPS()->getChromaCbQpOffset() + cu->getSlice()->getSliceQpDeltaCb();
+    }
+    else
+    {


More information about the x265-commits mailing list