HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TComTrQuant.h
Go to the documentation of this file.
1 /* The copyright in this software is being made available under the BSD
2  * License, included below. This software may be subject to other third party
3  * and contributor rights, including patent rights, and no such rights are
4  * granted under this license.
5  *
6  * Copyright (c) 2010-2017, ITU/ISO/IEC
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18  * be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31  * THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
38 #ifndef __TCOMTRQUANT__
39 #define __TCOMTRQUANT__
40 
41 #include "CommonDef.h"
42 #include "TComYuv.h"
43 #include "TComDataCU.h"
44 #include "TComChromaFormat.h"
45 #include "ContextTables.h"
46 
49 
50 // ====================================================================================================================
51 // Constants
52 // ====================================================================================================================
53 
54 #define QP_BITS 15
55 
56 // ====================================================================================================================
57 // Type definition
58 // ====================================================================================================================
59 
60 typedef struct
61 {
62  Int significantCoeffGroupBits[NUM_SIG_CG_FLAG_CTX][2 /*Flag = [0|1]*/];
63  Int significantBits[NUM_SIG_FLAG_CTX][2 /*Flag = [0|1]*/];
66  Int m_greaterOneBits[NUM_ONE_FLAG_CTX][2 /*Flag = [0|1]*/];
67  Int m_levelAbsBits[NUM_ABS_FLAG_CTX][2 /*Flag = [0|1]*/];
68 
69  Int blockCbpBits[NUM_QT_CBF_CTX_SETS * NUM_QT_CBF_CTX_PER_SET][2 /*Flag = [0|1]*/];
70  Int blockRootCbpBits[4][2 /*Flag = [0|1]*/];
71 
72  Int golombRiceAdaptationStatistics[RExt__GOLOMB_RICE_ADAPTATION_STATISTICS_SETS];
74 
75 // ====================================================================================================================
76 // Class definition
77 // ====================================================================================================================
78 
80 struct QpParam
81 {
85 
86  QpParam(const Int qpy,
87  const ChannelType chType,
88  const Int qpBdOffset,
89  const Int chromaQPOffset,
90  const ChromaFormat chFmt );
91 
92  QpParam(const TComDataCU &cu, const ComponentID compID);
93 
94 }; // END STRUCT DEFINITION QpParam
95 
96 
99 {
100 public:
101  TComTrQuant();
102  ~TComTrQuant();
103 
104  // initialize class
105  Void init ( UInt uiMaxTrSize,
106  Bool useRDOQ = false,
107  Bool useRDOQTS = false,
108  Bool useSelectiveRDOQ = false,
109  Bool bEnc = false,
110  Bool useTransformSkipFast = false
112  , Bool bUseAdaptQpSelect = false
113 #endif
114  );
115 
116  // transform & inverse transform functions
117  Void transformNxN( TComTU & rTu,
118  const ComponentID compID,
119  Pel * pcResidual,
120  const UInt uiStride,
121  TCoeff * rpcCoeff,
122 #if ADAPTIVE_QP_SELECTION
123  TCoeff * rpcArlCoeff,
124 #endif
125  TCoeff & uiAbsSum,
126  const QpParam & cQP
127  );
128 
129 
130  Void invTransformNxN( TComTU & rTu,
131  const ComponentID compID,
132  Pel *pcResidual,
133  const UInt uiStride,
134  TCoeff * pcCoeff,
135  const QpParam & cQP
136  DEBUG_STRING_FN_DECLAREP(psDebug));
137 
138  Void invRecurTransformNxN ( const ComponentID compID, TComYuv *pResidual, TComTU &rTu );
139 
140  Void rdpcmNxN ( TComTU& rTu, const ComponentID compID, Pel* pcResidual, const UInt uiStride, const QpParam& cQP, TCoeff* pcCoeff, TCoeff &uiAbsSum, RDPCMMode& rdpcmMode );
141  Void invRdpcmNxN( TComTU& rTu, const ComponentID compID, Pel* pcResidual, const UInt uiStride );
142 
143  Void applyForwardRDPCM( TComTU& rTu, const ComponentID compID, Pel* pcResidual, const UInt uiStride, const QpParam& cQP, TCoeff* pcCoeff, TCoeff &uiAbsSum, const RDPCMMode mode );
144 
145  // Misc functions
146 
147 #if RDOQ_CHROMA_LAMBDA
148  Void setLambdas(const Double lambdas[MAX_NUM_COMPONENT]) { for (UInt component = 0; component < MAX_NUM_COMPONENT; component++) m_lambdas[component] = lambdas[component]; }
149  Void selectLambda(const ComponentID compIdx) { m_dLambda = m_lambdas[compIdx]; }
150 #else
151  Void setLambda(Double dLambda) { m_dLambda = dLambda;}
152 #endif
153  Void setRDOQOffset( UInt uiRDOQOffset ) { m_uiRDOQOffset = uiRDOQOffset; }
154 
156 
157  static Int calcPatternSigCtx( const UInt* sigCoeffGroupFlag, UInt uiCGPosX, UInt uiCGPosY, UInt widthInGroups, UInt heightInGroups );
158 
159  static Int getSigCtxInc ( Int patternSigCtx,
160  const TUEntropyCodingParameters &codingParameters,
161  const Int scanPosition,
162  const Int log2BlockWidth,
163  const Int log2BlockHeight,
164  const ChannelType chanType
165  );
166 
167  static UInt getSigCoeffGroupCtxInc (const UInt* uiSigCoeffGroupFlag,
168  const UInt uiCGPosX,
169  const UInt uiCGPosY,
170  const UInt widthInGroups,
171  const UInt heightInGroups);
172 
175  Void setErrScaleCoeff ( UInt list, UInt size, Int qp, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths );
176  Double* getErrScaleCoeff ( UInt list, UInt size, Int qp ) { return m_errScale [size][list][qp]; };
177  Double& getErrScaleCoeffNoScalingList ( UInt list, UInt size, Int qp ) { return m_errScaleNoScalingList[size][list][qp]; };
178  Int* getQuantCoeff ( UInt list, Int qp, UInt size ) { return m_quantCoef [size][list][qp]; };
179  Int* getDequantCoeff ( UInt list, Int qp, UInt size ) { return m_dequantCoef [size][list][qp]; };
180  Void setUseScalingList ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; };
181  Bool getUseScalingList (const UInt width, const UInt height, const Bool isTransformSkip){ return m_scalingListEnabledFlag && (!isTransformSkip || ((width == 4) && (height == 4))); };
182  Void setFlatScalingList (const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
183  Void xsetFlatScalingList ( UInt list, UInt size, Int qp);
184  Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, Int qp);
185  Void xSetScalingListDec ( const TComScalingList &scalingList, UInt list, UInt size, Int qp);
186  Void setScalingList ( TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
187  Void setScalingListDec ( const TComScalingList &scalingList);
188  Void processScalingListEnc( Int *coeff, Int *quantcoeff, Int quantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc);
189  Void processScalingListDec( const Int *coeff, Int *dequantcoeff, Int invQuantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc);
190 #if ADAPTIVE_QP_SELECTION
192  Void storeSliceQpNext(TComSlice* pcSlice);
194  Int getQpDelta(Int qp) { return m_qpDelta[qp]; }
197 #endif
198  Void transformSkipQuantOneSample(TComTU &rTu, const ComponentID compID, const TCoeff resiDiff, TCoeff* pcCoeff, const UInt uiPos, const QpParam &cQP, const Bool bUseHalfRoundingPoint);
199  Void invTrSkipDeQuantOneSample(TComTU &rTu, ComponentID compID, TCoeff pcCoeff, Pel &reconSample, const QpParam &cQP, UInt uiPos );
200 
201 protected:
202 #if ADAPTIVE_QP_SELECTION
206 #endif
208 
209 // QpParam m_cQP; - removed - placed on the stack.
210 #if RDOQ_CHROMA_LAMBDA
212 #endif
220 #if ADAPTIVE_QP_SELECTION
222 #endif
224 
226 
231 
232 private:
233  // forward Transform
234  Void xT ( const Int channelBitDepth, Bool useDST, Pel* piBlkResi, UInt uiStride, TCoeff* psCoeff, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange );
235 
236  // skipping Transform
237  Void xTransformSkip ( Pel* piBlkResi, UInt uiStride, TCoeff* psCoeff, TComTU &rTu, const ComponentID component );
238 
239  Void signBitHidingHDQ( TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange );
240 
241  // quantization
242  Void xQuant( TComTU &rTu,
243  TCoeff * pSrc,
244  TCoeff * pDes,
245 #if ADAPTIVE_QP_SELECTION
246  TCoeff *pArlDes,
247 #endif
248  TCoeff &uiAbsSum,
249  const ComponentID compID,
250  const QpParam &cQP );
251 
252  Bool xNeedRDOQ( TComTU &rTu,
253  TCoeff * pSrc,
254  const ComponentID compID,
255  const QpParam &cQP );
256 
257  // RDOQ functions
258 
260  TCoeff * plSrcCoeff,
261  TCoeff * piDstCoeff,
262 #if ADAPTIVE_QP_SELECTION
263  TCoeff *piArlDstCoeff,
264 #endif
265  TCoeff &uiAbsSum,
266  const ComponentID compID,
267  const QpParam &cQP );
268 
269 __inline UInt xGetCodedLevel ( Double& rd64CodedCost,
270  Double& rd64CodedCost0,
271  Double& rd64CodedCostSig,
272  Intermediate_Int lLevelDouble,
273  UInt uiMaxAbsLevel,
274  UShort ui16CtxNumSig,
275  UShort ui16CtxNumOne,
276  UShort ui16CtxNumAbs,
277  UShort ui16AbsGoRice,
278  UInt c1Idx,
279  UInt c2Idx,
280  Int iQBits,
281  Double errorScale,
282  Bool bLast,
283  Bool useLimitedPrefixLength,
284  const Int maxLog2TrDynamicRange
285  ) const;
286 
287 
288  __inline Int xGetICRate ( const UInt uiAbsLevel,
289  const UShort ui16CtxNumOne,
290  const UShort ui16CtxNumAbs,
291  const UShort ui16AbsGoRice,
292  const UInt c1Idx,
293  const UInt c2Idx,
294  const Bool useLimitedPrefixLength,
295  const Int maxLog2TrDynamicRange
296  ) const;
297 
298  __inline Double xGetRateLast ( const UInt uiPosX, const UInt uiPosY, const ComponentID component ) const;
299  __inline Double xGetRateSigCoeffGroup( UShort uiSignificanceCoeffGroup, UShort ui16CtxNumSig ) const;
300  __inline Double xGetRateSigCoef ( UShort uiSignificance, UShort ui16CtxNumSig ) const;
301  __inline Double xGetICost ( Double dRate ) const;
302  __inline Double xGetIEPRate ( ) const;
303 
304 
305  // dequantization
306  Void xDeQuant( TComTU &rTu,
307  const TCoeff * pSrc,
308  TCoeff * pDes,
309  const ComponentID compID,
310  const QpParam &cQP );
311 
312  // inverse transform
313  Void xIT ( const Int channelBitDepth, Bool useDST, TCoeff* plCoef, Pel* pResidual, UInt uiStride, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange );
314 
315  // inverse skipping transform
316  Void xITransformSkip ( TCoeff* plCoef, Pel* pResidual, UInt uiStride, TComTU &rTu, const ComponentID component );
317 
318 public:
319  static Void crossComponentPrediction( TComTU &rTu,
320  const ComponentID compID,
321  const Pel *piResiL,
322  const Pel *piResiC,
323  Pel *piResiT,
324  const Int width,
325  const Int height,
326  const Int strideL,
327  const Int strideC,
328  const Int strideT,
329  const Bool reverse);
330 
331 };// END CLASS DEFINITION TComTrQuant
332 
334 
335 #endif // __TCOMTRQUANT__
Bool xNeedRDOQ(TComTU &rTu, TCoeff *pSrc, const ComponentID compID, const QpParam &cQP)
static const Int SCALING_LIST_REM_NUM
Definition: CommonDef.h:226
Int * m_dequantCoef[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of dequantization matrix coefficient 4x4
Definition: TComTrQuant.h:228
Int m_sliceNsamples[LEVEL_RANGE+1]
Definition: TComTrQuant.h:204
static const Int SCALING_LIST_NUM
list number for quantization matrix
Definition: CommonDef.h:232
UInt m_uiMaxTrSize
Definition: TComTrQuant.h:215
unsigned short UShort
Definition: TypeDef.h:210
Bool m_useRDOQ
Definition: TComTrQuant.h:217
static Int getSigCtxInc(Int patternSigCtx, const TUEntropyCodingParameters &codingParameters, const Int scanPosition, const Int log2BlockWidth, const Int log2BlockHeight, const ChannelType chanType)
Int * getSliceNSamples()
Definition: TComTrQuant.h:195
CU data structure class.
Definition: TComDataCU.h:64
Void destroyScalingList()
ChannelType
Definition: TypeDef.h:301
Void setScalingList(TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Double * m_errScale[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
Definition: TComTrQuant.h:229
Int m_qpDelta[MAX_QP+1]
Definition: TComTrQuant.h:203
Void setFlatScalingList(const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Defines version information, constants and small in-line functions.
void Void
Definition: TypeDef.h:203
Void setRDOQOffset(UInt uiRDOQOffset)
Definition: TComTrQuant.h:153
#define DEBUG_STRING_FN_DECLAREP(name)
Definition: TypeDef.h:183
estBitsSbacStruct * m_pcEstBitsSbac
Definition: TComTrQuant.h:155
static Void crossComponentPrediction(TComTU &rTu, const ComponentID compID, const Pel *piResiL, const Pel *piResiC, Pel *piResiT, const Int width, const Int height, const Int strideL, const Int strideC, const Int strideT, const Bool reverse)
__inline Double xGetICost(Double dRate) const
Void applyForwardRDPCM(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, const QpParam &cQP, TCoeff *pcCoeff, TCoeff &uiAbsSum, const RDPCMMode mode)
general YUV buffer class (header)
Bool m_useTransformSkipFast
Definition: TComTrQuant.h:223
QpParam(const Int qpy, const ChannelType chType, const Int qpBdOffset, const Int chromaQPOffset, const ChromaFormat chFmt)
Definition: TComTrQuant.cpp:71
unsigned int UInt
Definition: TypeDef.h:212
Double m_sliceSumC[LEVEL_RANGE+1]
Definition: TComTrQuant.h:205
static const Int LEVEL_RANGE
G382: max coefficient level in statistics collection.
Definition: CommonDef.h:175
Void xQuant(TComTU &rTu, TCoeff *pSrc, TCoeff *pDes, TCoeff *pArlDes, TCoeff &uiAbsSum, const ComponentID compID, const QpParam &cQP)
Short Pel
pixel type
Definition: TypeDef.h:249
SCALING_LIST class.
Definition: TComSlice.h:150
Void xITransformSkip(TCoeff *plCoef, Pel *pResidual, UInt uiStride, TComTU &rTu, const ComponentID component)
Int * getDequantCoeff(UInt list, Int qp, UInt size)
get Quant Coefficent
Definition: TComTrQuant.h:179
__inline Int xGetICRate(const UInt uiAbsLevel, const UShort ui16CtxNumOne, const UShort ui16CtxNumAbs, const UShort ui16AbsGoRice, const UInt c1Idx, const UInt c2Idx, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange) const
#define NUM_ONE_FLAG_CTX
number of context models for greater than 1 flag
Int * getQuantCoeff(UInt list, Int qp, UInt size)
get Error Scale Coefficent
Definition: TComTrQuant.h:178
Void init(UInt uiMaxTrSize, Bool useRDOQ=false, Bool useRDOQTS=false, Bool useSelectiveRDOQ=false, Bool bEnc=false, Bool useTransformSkipFast=false, Bool bUseAdaptQpSelect=false)
Void setUseScalingList(Bool bUseScalingList)
get DeQuant Coefficent
Definition: TComTrQuant.h:180
QP struct.
Definition: TComTrQuant.h:80
Void xDeQuant(TComTU &rTu, const TCoeff *pSrc, TCoeff *pDes, const ComponentID compID, const QpParam &cQP)
Int rem
Definition: TComTrQuant.h:84
static UInt getSigCoeffGroupCtxInc(const UInt *uiSigCoeffGroupFlag, const UInt uiCGPosX, const UInt uiCGPosY, const UInt widthInGroups, const UInt heightInGroups)
UInt m_uiRDOQOffset
Definition: TComTrQuant.h:214
RDPCMMode
Definition: TypeDef.h:267
TCoeff * m_plTempCoeff
Definition: TComTrQuant.h:207
Void storeSliceQpNext(TComSlice *pcSlice)
Double m_dLambda
Definition: TComTrQuant.h:213
Int Intermediate_Int
used as intermediate value in calculations
Definition: TypeDef.h:253
#define NUM_SIG_CG_FLAG_CTX
number of context models for MULTI_LEVEL_SIGNIFICANCE
Definition: ContextTables.h:73
Int getQpDelta(Int qp)
Definition: TComTrQuant.h:194
general YUV buffer class
Definition: TComYuv.h:54
Double & getErrScaleCoeffNoScalingList(UInt list, UInt size, Int qp)
get Error Scale Coefficent
Definition: TComTrQuant.h:177
Double * getErrScaleCoeff(UInt list, UInt size, Int qp)
Definition: TComTrQuant.h:176
bool Bool
Definition: TypeDef.h:204
Void transformSkipQuantOneSample(TComTU &rTu, const ComponentID compID, const TCoeff resiDiff, TCoeff *pcCoeff, const UInt uiPos, const QpParam &cQP, const Bool bUseHalfRoundingPoint)
Void invRdpcmNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride)
Void initScalingList()
#define ADAPTIVE_QP_SELECTION
G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection.
Definition: TypeDef.h:112
Bool m_bUseAdaptQpSelect
Definition: TComTrQuant.h:221
__inline Double xGetRateLast(const UInt uiPosX, const UInt uiPosY, const ComponentID component) const
Void processScalingListDec(const Int *coeff, Int *dequantcoeff, Int invQuantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc)
Bool m_scalingListEnabledFlag
Definition: TComTrQuant.h:225
Defines constants and tables for SBAC.
Int TCoeff
transform coefficient
Definition: TypeDef.h:250
Int * m_quantCoef[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
Definition: TComTrQuant.h:227
__inline Double xGetRateSigCoeffGroup(UShort uiSignificanceCoeffGroup, UShort ui16CtxNumSig) const
Void xSetScalingListEnc(TComScalingList *scalingList, UInt list, UInt size, Int qp)
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Definition: TypeDef.h:292
Int per
Definition: TComTrQuant.h:83
__inline Double xGetRateSigCoef(UShort uiSignificance, UShort ui16CtxNumSig) const
#define NUM_QT_CBF_CTX_PER_SET
number of context models for QT CBF
Void signBitHidingHDQ(TCoeff *pQCoef, TCoeff *pCoef, TCoeff *deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange)
Bool getUseScalingList(const UInt width, const UInt height, const Bool isTransformSkip)
Definition: TComTrQuant.h:181
__inline Double xGetIEPRate() const
Void setErrScaleCoeff(UInt list, UInt size, Int qp, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Void rdpcmNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, const QpParam &cQP, TCoeff *pcCoeff, TCoeff &uiAbsSum, RDPCMMode &rdpcmMode)
Double * getSliceSumC()
Definition: TComTrQuant.h:196
Void invTrSkipDeQuantOneSample(TComTU &rTu, ComponentID compID, TCoeff pcCoeff, Pel &reconSample, const QpParam &cQP, UInt uiPos)
Void invTransformNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, TCoeff *pcCoeff, const QpParam &cQP)
__inline UInt xGetCodedLevel(Double &rd64CodedCost, Double &rd64CodedCost0, Double &rd64CodedCostSig, Intermediate_Int lLevelDouble, UInt uiMaxAbsLevel, UShort ui16CtxNumSig, UShort ui16CtxNumOne, UShort ui16CtxNumAbs, UShort ui16AbsGoRice, UInt c1Idx, UInt c2Idx, Int iQBits, Double errorScale, Bool bLast, Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange) const
#define NUM_ABS_FLAG_CTX
number of context models for greater than 2 flag
Void xTransformSkip(Pel *piBlkResi, UInt uiStride, TCoeff *psCoeff, TComTU &rTu, const ComponentID component)
Void selectLambda(const ComponentID compIdx)
Definition: TComTrQuant.h:149
Void initSliceQpDelta()
Definition: TComTU.h:48
Void processScalingListEnc(Int *coeff, Int *quantcoeff, Int quantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc)
transform and quantization class
Definition: TComTrQuant.h:98
static Int calcPatternSigCtx(const UInt *sigCoeffGroupFlag, UInt uiCGPosX, UInt uiCGPosY, UInt widthInGroups, UInt heightInGroups)
Void xIT(const Int channelBitDepth, Bool useDST, TCoeff *plCoef, Pel *pResidual, UInt uiStride, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange)
Bool m_useSelectiveRDOQ
Definition: TComTrQuant.h:219
Void clearSliceARLCnt()
Void xsetFlatScalingList(UInt list, UInt size, Int qp)
int Int
Definition: TypeDef.h:211
static const Int RExt__GOLOMB_RICE_ADAPTATION_STATISTICS_SETS
Definition: CommonDef.h:213
ComponentID
Definition: TypeDef.h:308
Void xRateDistOptQuant(TComTU &rTu, TCoeff *plSrcCoeff, TCoeff *piDstCoeff, TCoeff *piArlDstCoeff, TCoeff &uiAbsSum, const ComponentID compID, const QpParam &cQP)
Void invRecurTransformNxN(const ComponentID compID, TComYuv *pResidual, TComTU &rTu)
#define NUM_QT_CBF_CTX_SETS
double Double
Definition: TypeDef.h:213
CU data structure (header)
slice header class
Definition: TComSlice.h:1225
Void setScalingListDec(const TComScalingList &scalingList)
static const Int MAX_QP
Definition: CommonDef.h:126
Void transformNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, TCoeff *rpcCoeff, TCoeff *rpcArlCoeff, TCoeff &uiAbsSum, const QpParam &cQP)
Double m_lambdas[MAX_NUM_COMPONENT]
Definition: TComTrQuant.h:211
Int Qp
Definition: TComTrQuant.h:82
#define NUM_SIG_FLAG_CTX
number of context models for sig flag
Void xSetScalingListDec(const TComScalingList &scalingList, UInt list, UInt size, Int qp)
Void xT(const Int channelBitDepth, Bool useDST, Pel *piBlkResi, UInt uiStride, TCoeff *psCoeff, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange)
Double m_errScaleNoScalingList[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
Definition: TComTrQuant.h:230
Bool m_useRDOQTS
Definition: TComTrQuant.h:218
Void setLambdas(const Double lambdas[MAX_NUM_COMPONENT])
Definition: TComTrQuant.h:148
static const Int LAST_SIGNIFICANT_GROUPS
Definition: CommonDef.h:242