HEVC Test Model (HM)  HM-16.3
TEncSearch.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-2015, 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 __TENCSEARCH__
39 #define __TENCSEARCH__
40 
41 // Include files
42 #include "TLibCommon/TComYuv.h"
44 #include "TLibCommon/TComPattern.h"
46 #include "TLibCommon/TComTrQuant.h"
47 #include "TLibCommon/TComPic.h"
49 #include "TEncEntropy.h"
50 #include "TEncSbac.h"
51 #include "TEncCfg.h"
52 
53 
56 
57 class TEncCu;
58 
59 // ====================================================================================================================
60 // Class definition
61 // ====================================================================================================================
62 
64 static const UInt MAX_IDX_ADAPT_SR=33;
65 static const UInt NUM_MV_PREDICTORS=3;
66 
68 class TEncSearch : public TComPrediction
69 {
70 private:
71  TCoeff** m_ppcQTTempCoeff[MAX_NUM_COMPONENT /* 0->Y, 1->Cb, 2->Cr*/];
73 #if ADAPTIVE_QP_SELECTION
76 #endif
79 
81  TComYuv m_tmpYuvPred; // To be used in xGetInterPredictionError() to avoid constant memory allocation/deallocation
82 
88 #if ADAPTIVE_QP_SELECTION
90 #endif
91 
92 protected:
93  // interface to option
95 
96  // interface to classes
100 
101  // ME parameters
103  Int m_bipredSearchRange; // Search range for bi-prediction
108  TComMv m_acMvPredictors[NUM_MV_PREDICTORS]; // Left, Above, AboveRight. enum MVP_DIR first NUM_MV_PREDICTORS entries are suitable for accessing.
109 
110  // RD computation
114 
115  // Misc.
118 
119  // AMVP cost computation
120  // UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS];
122 
124 
125 public:
126  TEncSearch();
127  virtual ~TEncSearch();
128 
129  Void init( TEncCfg* pcEncCfg,
130  TComTrQuant* pcTrQuant,
131  Int iSearchRange,
132  Int bipredSearchRange,
133  Int iFastSearch,
134  TEncEntropy* pcEntropyCoder,
135  TComRdCost* pcRdCost,
136  TEncSbac*** pppcRDSbacCoder,
137  TEncSbac* pcRDGoOnSbacCoder );
138 
139 protected:
140 
143  TComMv baseRefMv,
144  Int iFrac, TComMv& rcMvFrac, Bool bAllowUseOfHadamard
145  );
146 
147  typedef struct
148  {
158 
159  // sub-functions for ME
160  __inline Void xTZSearchHelp ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance );
161  __inline Void xTZ2PointSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB );
162  __inline Void xTZ8PointSquareSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist );
163  __inline Void xTZ8PointDiamondSearch( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist );
164 
165  Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, Distortion& ruiSAD, Bool Hadamard );
166 
167 public:
169  TComYuv* pcOrgYuv,
170  TComYuv* pcPredYuv,
171  TComYuv* pcResiYuv,
172  TComYuv* pcRecoYuv,
174  DEBUG_STRING_FN_DECLARE(sDebug));
175 
177  TComYuv* pcOrgYuv,
178  TComYuv* pcPredYuv,
179  TComYuv* pcResiYuv,
180  TComYuv* pcRecoYuv,
182  DEBUG_STRING_FN_DECLARE(sDebug));
183 
186  TComYuv* pcOrgYuv,
187  TComYuv* pcPredYuv,
188  TComYuv* pcResiYuv,
189  TComYuv* pcRecoYuv
190  DEBUG_STRING_FN_DECLARE(sDebug),
191  Bool bUseRes = false
192 #if AMP_MRG
193  ,Bool bUseMRG = false
194 #endif
195  );
196 
199  TComYuv* pcYuvOrg,
200  TComYuv* pcYuvPred,
201  TComYuv* pcYuvResi,
202  TComYuv* pcYuvResiBest,
203  TComYuv* pcYuvRec,
204  Bool bSkipResidual
205  DEBUG_STRING_FN_DECLARE(sDebug) );
206 
208  Void setAdaptiveSearchRange ( Int iDir, Int iRefIdx, Int iSearchRange) { assert(iDir < MAX_NUM_REF_LIST_ADAPT_SR && iRefIdx<Int(MAX_IDX_ADAPT_SR)); m_aaiAdaptSR[iDir][iRefIdx] = iSearchRange; }
209 
210  Void xEncPCM (TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piOrg, Pel* piPCM, Pel* piPred, Pel* piResi, Pel* piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, const ComponentID compID );
211  Void IPCMSearch (TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcPredYuv, TComYuv* rpcResiYuv, TComYuv* rpcRecoYuv );
212 protected:
213 
214  // -------------------------------------------------------------------------------------------------------------------
215  // Intra search
216  // -------------------------------------------------------------------------------------------------------------------
217 
218  Void xEncSubdivCbfQT ( TComTU &rTu,
219  Bool bLuma,
220  Bool bChroma );
221 
222  Void xEncCoeffQT ( TComTU &rTu,
223  ComponentID component,
224  Bool bRealCoeff );
226  UInt uiTrDepth,
227  UInt uiAbsPartIdx,
228  Bool bLuma,
229  Bool bChroma );
230  UInt xGetIntraBitsQT ( TComTU &rTu,
231  Bool bLuma,
232  Bool bChroma,
233  Bool bRealCoeff );
234 
236  ComponentID compID,
237  Bool bRealCoeff );
238 
239  Void xIntraCodingTUBlock ( TComYuv* pcOrgYuv,
240  TComYuv* pcPredYuv,
241  TComYuv* pcResiYuv,
243  const Bool checkCrossCPrediction,
244  Distortion& ruiDist,
245  const ComponentID compID,
246  TComTU &rTu
248  ,Int default0Save1Load2 = 0
249  );
250 
252  TComYuv* pcPredYuv,
253  TComYuv* pcResiYuv,
254  Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE],
255  Distortion& ruiDistY,
257  Bool bCheckFirst,
258 #endif
259  Double& dRDCost,
260  TComTU &rTu
261  DEBUG_STRING_FN_DECLARE(sDebug));
262 
263  Void xSetIntraResultLumaQT ( TComYuv* pcRecoYuv,
264  TComTU &rTu);
265 
267  const Pel *pBestLuma,
268  TComTU &rTu,
269  const Int xOffset,
270  const Int yOffset,
271  const Int strideResi,
272  const Int strideBest );
273 
275  const ComponentID compID,
276  const Pel* piResiL,
277  const Pel* piResiC,
278  const Int width,
279  const Int height,
280  const Int strideL,
281  const Int strideC );
282 
284  TComYuv* pcPredYuv,
285  TComYuv* pcResiYuv,
286  Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE],
287  Distortion& ruiDist,
288  TComTU &rTu
289  DEBUG_STRING_FN_DECLARE(sDebug));
290 
291  Void xSetIntraResultChromaQT ( TComYuv* pcRecoYuv, TComTU &rTu);
292 
293  Void xStoreIntraResultQT ( const ComponentID compID, TComTU &rTu);
294  Void xLoadIntraResultQT ( const ComponentID compID, TComTU &rTu);
295 
296 
297  // -------------------------------------------------------------------------------------------------------------------
298  // Inter search (AMP)
299  // -------------------------------------------------------------------------------------------------------------------
300 
302  TComYuv* pcOrgYuv,
303  UInt uiPartIdx,
304  RefPicList eRefPicList,
305  Int iRefIdx,
306  TComMv& rcMvPred,
307  Bool bFilled = false
308  , Distortion* puiDistBiP = NULL
309  );
310 
311  Void xCheckBestMVP ( TComDataCU* pcCU,
312  RefPicList eRefPicList,
313  TComMv cMv,
314  TComMv& rcMvPred,
315  Int& riMVPIdx,
316  UInt& ruiBits,
317  Distortion& ruiCost );
318 
320  UInt uiPartIdx,
321  UInt uiPartAddr,
322  TComYuv* pcOrgYuv,
323  TComYuv* pcTemplateCand,
324  TComMv cMvCand,
325  Int iMVPIdx,
326  Int iMVPNum,
327  RefPicList eRefPicList,
328  Int iRefIdx,
329  Int iSizeX,
330  Int iSizeY
331  );
332 
333 
334  Void xCopyAMVPInfo ( AMVPInfo* pSrc, AMVPInfo* pDst );
335  UInt xGetMvpIdxBits ( Int iIdx, Int iNum );
336  Void xGetBlkBits ( PartSize eCUMode, Bool bPSlice, Int iPartIdx, UInt uiLastMode, UInt uiBlkBit[3]);
337 
339  TComYuv* pcYuvOrg,
340  Int iPartIdx,
341  UInt& uiInterDir,
342  TComMvField* pacMvField,
343  UInt& uiMergeIndex,
344  Distortion& ruiCost,
345  TComMvField* cMvFieldNeighbours,
346  UChar* uhInterDirNeighbours,
347  Int& numValidMergeCand
348  );
349 
351  UInt puIdx,
352  TComMvField* mvFieldNeighbours,
353  UChar* interDirNeighbours,
354  Int numValidMergeCand );
355 
356 
357  // -------------------------------------------------------------------------------------------------------------------
358  // motion estimation
359  // -------------------------------------------------------------------------------------------------------------------
360 
362  TComYuv* pcYuvOrg,
363  Int iPartIdx,
364  RefPicList eRefPicList,
365  TComMv* pcMvPred,
366  Int iRefIdxPred,
367  TComMv& rcMv,
368  UInt& ruiBits,
369  Distortion& ruiCost,
370  Bool bBi = false );
371 
372  Void xTZSearch ( TComDataCU* pcCU,
373  TComPattern* pcPatternKey,
374  Pel* piRefY,
375  Int iRefStride,
376  TComMv* pcMvSrchRngLT,
377  TComMv* pcMvSrchRngRB,
378  TComMv& rcMv,
379  Distortion& ruiSAD,
380  const TComMv *pIntegerMv2Nx2NPred
381  );
382 
384  TComPattern* pcPatternKey,
385  Pel* piRefY,
386  Int iRefStride,
387  TComMv* pcMvSrchRngLT,
388  TComMv* pcMvSrchRngRB,
389  TComMv& rcMv,
390  Distortion& ruiSAD,
391  const TComMv *pIntegerMv2Nx2NPred
392  );
393 
395  TComMv& cMvPred,
396  Int iSrchRng,
397  TComMv& rcMvSrchRngLT,
398  TComMv& rcMvSrchRngRB );
399 
401  TComPattern* pcPatternKey,
402  Pel* piRefY,
403  Int iRefStride,
404  TComMv* pcMvSrchRngLT,
405  TComMv* pcMvSrchRngRB,
406  TComMv& rcMv,
407  Distortion& ruiSAD,
408  const TComMv* pIntegerMv2Nx2NPred
409  );
410 
411  Void xPatternSearch ( TComPattern* pcPatternKey,
412  Pel* piRefY,
413  Int iRefStride,
414  TComMv* pcMvSrchRngLT,
415  TComMv* pcMvSrchRngRB,
416  TComMv& rcMv,
417  Distortion& ruiSAD );
418 
420  Bool bIsLosslessCoded,
421  TComPattern* pcPatternKey,
422  Pel* piRefY,
423  Int iRefStride,
424  TComMv* pcMvInt,
425  TComMv& rcMvHalf,
426  TComMv& rcMvQter,
427  Distortion& ruiCost,
428  Bool biPred
429  );
430 
431  Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred );
432  Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred );
433 
434  // -------------------------------------------------------------------------------------------------------------------
435  // T & Q & Q-1 & T-1
436  // -------------------------------------------------------------------------------------------------------------------
437 
438 
439  Void xEncodeInterResidualQT( const ComponentID compID, TComTU &rTu );
440  Void xEstimateInterResidualQT( TComYuv* pcResi, Double &rdCost, UInt &ruiBits, Distortion &ruiDist, Distortion *puiZeroDist, TComTU &rTu DEBUG_STRING_FN_DECLARE(sDebug) );
441  Void xSetInterResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu );
442 
443  UInt xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPartOffset, UInt uiDepth, UInt uiInitTrDepth, const ChannelType compID );
444  UInt xUpdateCandList( UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double * CandCostList );
445 
446  // -------------------------------------------------------------------------------------------------------------------
447  // compute symbol bits
448  // -------------------------------------------------------------------------------------------------------------------
449 
451  UInt uiQp,
452  UInt uiTrMode,
453  UInt& ruiBits);
454 
455  Void setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx, RefPicList eRefPicListCur );
456  inline Void setDistParamComp( ComponentID compIdx ) { m_cDistParam.compIdx = compIdx; }
457 
458 };// END CLASS DEFINITION TEncSearch
459 
461 
462 #endif // __TENCSEARCH__
#define MAX_CU_SIZE
Definition: TComRom.h:54
Void xRestrictBipredMergeCand(TComDataCU *pcCU, UInt puIdx, TComMvField *mvFieldNeighbours, UChar *interDirNeighbours, Int numValidMergeCand)
Int m_iSearchRange
Definition: TEncSearch.h:102
entropy encoder class (header)
TCoeff * m_pcQTTempCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:72
Void xEncPCM(TComDataCU *pcCU, UInt uiAbsPartIdx, Pel *piOrg, Pel *piPCM, Pel *piPred, Pel *piResi, Pel *piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, const ComponentID compID)
CU data structure class.
Definition: TComDataCU.h:64
static const UInt MAX_IDX_ADAPT_SR
Definition: TEncSearch.h:64
ChannelType
Definition: TypeDef.h:361
TCoeff * m_ppcQTTempTUArlCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:89
prediction class (header)
UInt Distortion
distortion measurement
Definition: TypeDef.h:703
void Void
Definition: TypeDef.h:285
TCoeff ** m_ppcQTTempArlCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:74
Pel * m_pTempPel
Definition: TEncSearch.h:116
const UInt * m_puiDFilter
Definition: TEncSearch.h:117
Void xEncIntraHeader(TComDataCU *pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, Bool bLuma, Bool bChroma)
Definition: TEncSearch.cpp:980
Void xEncSubdivCbfQT(TComTU &rTu, Bool bLuma, Bool bChroma)
Definition: TEncSearch.cpp:869
TComRdCost * m_pcRdCost
Definition: TEncSearch.h:98
#define NULL
Definition: CommonDef.h:100
general YUV buffer class (header)
class for motion vector with reference index
static const UInt MAX_NUM_REF_LIST_ADAPT_SR
Definition: TEncSearch.h:63
neighbouring pixel access class for all components
Definition: TComPattern.h:80
Void xMotionEstimation(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, RefPicList eRefPicList, TComMv *pcMvPred, Int iRefIdxPred, TComMv &rcMv, UInt &ruiBits, Distortion &ruiCost, Bool bBi=false)
char Char
Definition: TypeDef.h:291
unsigned int UInt
Definition: TypeDef.h:297
Distortion xPatternRefinement(TComPattern *pcPatternKey, TComMv baseRefMv, Int iFrac, TComMv &rcMvFrac, Bool bAllowUseOfHadamard)
sub-function for motion vector refinement used in fractional-pel accuracy
Definition: TEncSearch.cpp:811
TCoeff * m_pcQTTempArlCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:75
Void setDistParamComp(ComponentID compIdx)
Definition: TEncSearch.h:456
Void xEncCoeffQT(TComTU &rTu, ComponentID component, Bool bRealCoeff)
Definition: TEncSearch.cpp:940
Short Pel
pixel type
Definition: TypeDef.h:692
Void xSetIntraResultLumaQT(TComYuv *pcRecoYuv, TComTU &rTu)
encoder search class
Definition: TEncSearch.h:68
UInt xGetMvpIdxBits(Int iIdx, Int iNum)
Void xRecurIntraChromaCodingQT(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][(1<<(6))*(1<<(6))], Distortion &ruiDist, TComTU &rTu)
TComYuv m_pcQTTempTransformSkipTComYuv
Definition: TEncSearch.h:87
picture class (header)
Void setWpScalingDistParam(TComDataCU *pcCU, Int iRefIdx, RefPicList eRefPicListCur)
set wp tables
Int m_aaiAdaptSR[MAX_NUM_REF_LIST_ADAPT_SR][MAX_IDX_ADAPT_SR]
Definition: TEncSearch.h:105
UInt xUpdateCandList(UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt *CandModeList, Double *CandCostList)
Void xCopyAMVPInfo(AMVPInfo *pSrc, AMVPInfo *pDst)
UChar * m_puhQTTempTransformSkipFlag[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:86
UInt m_auiMVPIdxCost[2+1][2+1]
Definition: TEncSearch.h:121
#define AMVP_MAX_NUM_CANDS
max number of final candidates
Definition: CommonDef.h:183
Void setAdaptiveSearchRange(Int iDir, Int iRefIdx, Int iSearchRange)
set ME search range
Definition: TEncSearch.h:208
Void xIntraCodingTUBlock(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][(1<<(6))*(1<<(6))], const Bool checkCrossCPrediction, Distortion &ruiDist, const ComponentID compID, TComTU &rTu, Int default0Save1Load2=0)
Void xPatternSearchFast(TComDataCU *pcCU, TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *pIntegerMv2Nx2NPred)
TCoeff ** m_ppcQTTempCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:71
PartSize
supported partition shape
Definition: TypeDef.h:393
Void xSetSearchRange(TComDataCU *pcCU, TComMv &cMvPred, Int iSrchRng, TComMv &rcMvSrchRngLT, TComMv &rcMvSrchRngRB)
encoder configuration class (header)
Void xTZSearchSelective(TComDataCU *pcCU, TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *pIntegerMv2Nx2NPred)
Void xEstimateInterResidualQT(TComYuv *pcResi, Double &rdCost, UInt &ruiBits, Distortion &ruiDist, Distortion *puiZeroDist, TComTU &rTu)
TEncSbac * m_pcRDGoOnSbacCoder
Definition: TEncSearch.h:112
general YUV buffer class
Definition: TComYuv.h:54
static const UInt NUM_MV_PREDICTORS
Definition: TEncSearch.h:65
bool Bool
Definition: TypeDef.h:286
Void xAddSymbolBitsInter(TComDataCU *pcCU, UInt uiQp, UInt uiTrMode, UInt &ruiBits)
DistParam m_cDistParam
Definition: TEncSearch.h:113
UInt xModeBitsIntra(TComDataCU *pcCU, UInt uiMode, UInt uiPartOffset, UInt uiDepth, UInt uiInitTrDepth, const ChannelType compID)
distortion parameter class
Definition: TComRdCost.h:67
RD cost computation class.
Definition: TComRdCost.h:104
#define HHI_RQT_INTRA_SPEEDUP
tests one best mode with full rqt
Definition: TypeDef.h:154
UInt xGetIntraBitsQT(TComTU &rTu, Bool bLuma, Bool bChroma, Bool bRealCoeff)
motion information handling classes (header)
parameters for AMVP
virtual ~TEncSearch()
Definition: TEncSearch.cpp:144
entropy encoder class
Definition: TEncEntropy.h:121
TComMv m_acMvPredictors[NUM_MV_PREDICTORS]
Definition: TEncSearch.h:108
Void estIntraPredChromaQT(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][(1<<(6))*(1<<(6))])
Int TCoeff
transform coefficient
Definition: TypeDef.h:693
RefPicList
reference list index
Definition: TypeDef.h:415
Void xMergeEstimation(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, UInt &uiInterDir, TComMvField *pacMvField, UInt &uiMergeIndex, Distortion &ruiCost, TComMvField *cMvFieldNeighbours, UChar *uhInterDirNeighbours, Int &numValidMergeCand)
estimation of best merge coding
ComponentID compIdx
Definition: TComRdCost.h:82
unsigned char UChar
Definition: TypeDef.h:293
__inline Void xTZ8PointSquareSearch(TComPattern *pcPatternKey, IntTZSearchStruct &rcStrukt, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist)
Definition: TEncSearch.cpp:574
TEncSbac *** m_pppcRDSbacCoder
Definition: TEncSearch.h:111
TEncEntropy * m_pcEntropyCoder
Definition: TEncSearch.h:99
__inline Void xTZ8PointDiamondSearch(TComPattern *pcPatternKey, IntTZSearchStruct &rcStrukt, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist)
Definition: TEncSearch.cpp:632
#define AMP_MRG
encoder only force merge for AMP partition (no motion search for AMP)
Definition: TypeDef.h:207
TComMv m_cSrchRngLT
Definition: TEncSearch.h:106
__inline Void xTZSearchHelp(TComPattern *pcPatternKey, IntTZSearchStruct &rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance)
Definition: TEncSearch.cpp:335
#define MAX_NUM_REF
max. number of entries in picture reference list
Definition: CommonDef.h:113
UChar * m_puhQTTempCbf[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:78
Void xPatternSearchFracDIF(Bool bIsLosslessCoded, TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvInt, TComMv &rcMvHalf, TComMv &rcMvQter, Distortion &ruiCost, Bool biPred)
Int m_bipredSearchRange
Definition: TEncSearch.h:103
Void xStoreIntraResultQT(const ComponentID compID, TComTU &rTu)
Void xGetBlkBits(PartSize eCUMode, Bool bPSlice, Int iPartIdx, UInt uiLastMode, UInt uiBlkBit[3])
Void IPCMSearch(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *rpcPredYuv, TComYuv *rpcResiYuv, TComYuv *rpcRecoYuv)
Function for PCM mode estimation.
Void estIntraPredLumaQT(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][(1<<(6))*(1<<(6))])
Context-adaptive entropy encoder class (header)
Pel * m_pSharedPredTransformSkip[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:84
Void xEstimateMvPredAMVP(TComDataCU *pcCU, TComYuv *pcOrgYuv, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv &rcMvPred, Bool bFilled=false, Distortion *puiDistBiP=0)
#define DEBUG_STRING_FN_DECLARE(name)
Definition: TypeDef.h:71
Definition: TComTU.h:48
TComTrQuant * m_pcTrQuant
Definition: TEncSearch.h:97
neighbouring pixel access classes (header)
TComYuv * m_pcQTTempTComYuv
Definition: TEncSearch.h:80
Void predInterSearch(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Bool bUseRes=false, Bool bUseMRG=false)
encoder estimation - inter prediction (non-skip)
Void xExtDIFUpSamplingH(TComPattern *pcPattern, Bool biPred)
Generate half-sample interpolated block.
UInt xGetIntraBitsQTChroma(TComTU &rTu, ComponentID compID, Bool bRealCoeff)
__inline Void xTZ2PointSearch(TComPattern *pcPatternKey, IntTZSearchStruct &rcStrukt, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB)
Definition: TEncSearch.cpp:441
transform and quantization class
Definition: TComTrQuant.h:98
TCoeff * m_pcQTTempTUCoeff[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:85
Void xSetIntraResultChromaQT(TComYuv *pcRecoYuv, TComTU &rTu)
Void xEncodeInterResidualQT(const ComponentID compID, TComTU &rTu)
TComYuv m_tmpYuvPred
Definition: TEncSearch.h:81
UChar * m_puhQTTempTrIdx
Definition: TEncSearch.h:77
Void xGetInterPredictionError(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, Distortion &ruiSAD, Bool Hadamard)
Char * m_phQTTempCrossComponentPredictionAlpha[MAX_NUM_COMPONENT]
Definition: TEncSearch.h:83
TComMv m_integerMv2Nx2N[NUM_REF_PIC_LIST_01][16]
Definition: TEncSearch.h:123
int Int
Definition: TypeDef.h:296
basic motion vector class
Definition: TComMv.h:51
Distortion xGetTemplateCost(TComDataCU *pcCU, UInt uiPartIdx, UInt uiPartAddr, TComYuv *pcOrgYuv, TComYuv *pcTemplateCand, TComMv cMvCand, Int iMVPIdx, Int iMVPNum, RefPicList eRefPicList, Int iRefIdx, Int iSizeX, Int iSizeY)
ComponentID
Definition: TypeDef.h:368
Void xSetInterResidualQTData(TComYuv *pcResi, Bool bSpatial, TComTU &rTu)
transform and quantization class (header)
CU encoder class.
Definition: TEncCu.h:65
Void xStoreCrossComponentPredictionResult(Pel *pResiLuma, const Pel *pBestLuma, TComTU &rTu, const Int xOffset, const Int yOffset, const Int strideResi, const Int strideBest)
encoder configuration class
Definition: TEncCfg.h:99
Int m_iFastSearch
Definition: TEncSearch.h:104
SBAC encoder class.
Definition: TEncSbac.h:66
double Double
Definition: TypeDef.h:298
Void xLoadIntraResultQT(const ComponentID compID, TComTU &rTu)
Char xCalcCrossComponentPredictionAlpha(TComTU &rTu, const ComponentID compID, const Pel *piResiL, const Pel *piResiC, const Int width, const Int height, const Int strideL, const Int strideC)
Void xRecurIntraCodingLumaQT(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][(1<<(6))*(1<<(6))], Distortion &ruiDistY, Bool bCheckFirst, Double &dRDCost, TComTU &rTu)
TComMv m_cSrchRngRB
Definition: TEncSearch.h:107
Void encodeResAndCalcRdInterCU(TComDataCU *pcCU, TComYuv *pcYuvOrg, TComYuv *pcYuvPred, TComYuv *pcYuvResi, TComYuv *pcYuvResiBest, TComYuv *pcYuvRec, Bool bSkipResidual)
encode residual and compute rd-cost for inter mode
Void xExtDIFUpSamplingQ(TComPattern *pcPatternKey, TComMv halfPelRef, Bool biPred)
Generate quarter-sample interpolated blocks.
Void init(TEncCfg *pcEncCfg, TComTrQuant *pcTrQuant, Int iSearchRange, Int bipredSearchRange, Int iFastSearch, TEncEntropy *pcEntropyCoder, TComRdCost *pcRdCost, TEncSbac ***pppcRDSbacCoder, TEncSbac *pcRDGoOnSbacCoder)
Definition: TEncSearch.cpp:201
Void xCheckBestMVP(TComDataCU *pcCU, RefPicList eRefPicList, TComMv cMv, TComMv &rcMvPred, Int &riMVPIdx, UInt &ruiBits, Distortion &ruiCost)
Void xTZSearch(TComDataCU *pcCU, TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *pIntegerMv2Nx2NPred)
TEncCfg * m_pcEncCfg
Definition: TEncSearch.h:94
Void xPatternSearch(TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvSrchRngLT, TComMv *pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD)