source: 3DVCSoftware/branches/HTM-11.2-dev3-HHI/source/Lib/TLibEncoder/TEncSearch.h @ 1019

Last change on this file since 1019 was 1019, checked in by hhi, 10 years ago

Integration of JCT3V-I0066: Encoder modification for DMM4, macro is HHI_DMM4_ENC_I0066.

  • Property svn:eol-style set to native
File size: 25.7 KB
Line 
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-2014, 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
34/** \file     TEncSearch.h
35    \brief    encoder search class (header)
36*/
37
38#ifndef __TENCSEARCH__
39#define __TENCSEARCH__
40
41// Include files
42#include "TLibCommon/TComYuv.h"
43#include "TLibCommon/TComMotionInfo.h"
44#include "TLibCommon/TComPattern.h"
45#include "TLibCommon/TComPrediction.h"
46#include "TLibCommon/TComTrQuant.h"
47#include "TLibCommon/TComPic.h"
48#include "TEncEntropy.h"
49#include "TEncSbac.h"
50#include "TEncCfg.h"
51
52//! \ingroup TLibEncoder
53//! \{
54
55class TEncCu;
56
57// ====================================================================================================================
58// Class definition
59// ====================================================================================================================
60
61/// encoder search class
62class TEncSearch : public TComPrediction
63{
64private:
65  TCoeff**        m_ppcQTTempCoeffY;
66  TCoeff**        m_ppcQTTempCoeffCb;
67  TCoeff**        m_ppcQTTempCoeffCr;
68  TCoeff*         m_pcQTTempCoeffY;
69  TCoeff*         m_pcQTTempCoeffCb;
70  TCoeff*         m_pcQTTempCoeffCr;
71#if ADAPTIVE_QP_SELECTION
72  Int**           m_ppcQTTempArlCoeffY;
73  Int**           m_ppcQTTempArlCoeffCb;
74  Int**           m_ppcQTTempArlCoeffCr;
75  Int*            m_pcQTTempArlCoeffY;
76  Int*            m_pcQTTempArlCoeffCb;
77  Int*            m_pcQTTempArlCoeffCr;
78#endif
79  UChar*          m_puhQTTempTrIdx;
80  UChar*          m_puhQTTempCbf[3];
81 
82  TComYuv*        m_pcQTTempTComYuv;
83  TComYuv         m_tmpYuvPred; // To be used in xGetInterPredictionError() to avoid constant memory allocation/deallocation
84  Pel*            m_pSharedPredTransformSkip[3];
85  TCoeff*         m_pcQTTempTUCoeffY;
86  TCoeff*         m_pcQTTempTUCoeffCb;
87  TCoeff*         m_pcQTTempTUCoeffCr;
88  UChar*          m_puhQTTempTransformSkipFlag[3];
89  TComYuv         m_pcQTTempTransformSkipTComYuv;
90#if ADAPTIVE_QP_SELECTION
91  Int*            m_ppcQTTempTUArlCoeffY;
92  Int*            m_ppcQTTempTUArlCoeffCb;
93  Int*            m_ppcQTTempTUArlCoeffCr;
94#endif
95protected:
96  // interface to option
97  TEncCfg*        m_pcEncCfg;
98 
99  // interface to classes
100  TComTrQuant*    m_pcTrQuant;
101  TComRdCost*     m_pcRdCost;
102  TEncEntropy*    m_pcEntropyCoder;
103 
104  // ME parameters
105  Int             m_iSearchRange;
106  Int             m_bipredSearchRange; // Search range for bi-prediction
107  Int             m_iFastSearch;
108  Int             m_aaiAdaptSR[2][33];
109  TComMv          m_cSrchRngLT;
110  TComMv          m_cSrchRngRB;
111  TComMv          m_acMvPredictors[3];
112 
113  // RD computation
114  TEncSbac***     m_pppcRDSbacCoder;
115  TEncSbac*       m_pcRDGoOnSbacCoder;
116  DistParam       m_cDistParam;
117 
118  // Misc.
119  Pel*            m_pTempPel;
120  const UInt*     m_puiDFilter;
121  Int             m_iMaxDeltaQP;
122
123#if H_3D_VSO // M17
124  TComYuv         m_cYuvRecTemp; 
125#endif
126  // AMVP cost computation
127  // UInt            m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS];
128  UInt            m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS+1]; //th array bounds
129 
130public:
131  TEncSearch();
132  virtual ~TEncSearch();
133 
134  Void init(  TEncCfg*      pcEncCfg,
135            TComTrQuant*  pcTrQuant,
136            Int           iSearchRange,
137            Int           bipredSearchRange,
138            Int           iFastSearch,
139            Int           iMaxDeltaQP,
140            TEncEntropy*  pcEntropyCoder,
141            TComRdCost*   pcRdCost,
142            TEncSbac***   pppcRDSbacCoder,
143            TEncSbac*     pcRDGoOnSbacCoder );
144 
145protected:
146 
147  /// sub-function for motion vector refinement used in fractional-pel accuracy
148  UInt  xPatternRefinement( TComPattern* pcPatternKey,
149                           TComMv baseRefMv,
150                           Int iFrac, TComMv& rcMvFrac );
151 
152  typedef struct
153  {
154    Pel*  piRefY;
155    Int   iYStride;
156    Int   iBestX;
157    Int   iBestY;
158    UInt  uiBestRound;
159    UInt  uiBestDistance;
160    UInt  uiBestSad;
161    UChar ucPointNr;
162  } IntTZSearchStruct;
163 
164  // sub-functions for ME
165  __inline Void xTZSearchHelp         ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance );
166  __inline Void xTZ2PointSearch       ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB );
167  __inline Void xTZ8PointSquareSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist );
168  __inline Void xTZ8PointDiamondSearch( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist );
169 
170  Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiSAD, Bool Hadamard );
171
172public:
173  Void  preestChromaPredMode    ( TComDataCU* pcCU, 
174                                  TComYuv*    pcOrgYuv, 
175                                  TComYuv*    pcPredYuv );
176  Void  estIntraPredQT          ( TComDataCU* pcCU, 
177                                  TComYuv*    pcOrgYuv, 
178                                  TComYuv*    pcPredYuv, 
179                                  TComYuv*    pcResiYuv, 
180                                  TComYuv*    pcRecoYuv,
181                                  UInt&       ruiDistC,
182                                  Bool        bLumaOnly
183#if HHI_DMM4_ENC_I0066
184                                , Bool        bOnlyIVP
185#endif
186                                );
187  Void  estIntraPredChromaQT    ( TComDataCU* pcCU, 
188                                  TComYuv*    pcOrgYuv, 
189                                  TComYuv*    pcPredYuv, 
190                                  TComYuv*    pcResiYuv, 
191                                  TComYuv*    pcRecoYuv,
192                                  UInt        uiPreCalcDistC );
193#if MTK_SINGLE_DEPTH_MODE_I0095
194  Void  estIntraPredSingleDepth  ( TComDataCU* pcCU, 
195                                  TComYuv*    pcOrgYuv, 
196                                  TComYuv*    pcPredYuv, 
197                                  TComYuv*    pcResiYuv, 
198                                  TComYuv*    pcRecoYuv,
199                                  UInt&       ruiDistC,
200                                  Bool        bLumaOnly );
201#endif   
202 
203  /// encoder estimation - inter prediction (non-skip)
204  Void predInterSearch          ( TComDataCU* pcCU,
205                                  TComYuv*    pcOrgYuv,
206                                  TComYuv*&   rpcPredYuv,
207                                  TComYuv*&   rpcResiYuv,
208                                  TComYuv*&   rpcRecoYuv,
209#if H_3D_FAST_TEXTURE_ENCODING
210                                  Bool        bFMD,
211#endif
212                                  Bool        bUseRes = false
213#if AMP_MRG
214                                 ,Bool        bUseMRG = false
215#endif
216                                );
217 
218  /// encode residual and compute rd-cost for inter mode
219  Void encodeResAndCalcRdInterCU( TComDataCU* pcCU,
220                                  TComYuv*    pcYuvOrg,
221                                  TComYuv*    pcYuvPred,
222                                  TComYuv*&   rpcYuvResi,
223                                  TComYuv*&   rpcYuvResiBest,
224                                  TComYuv*&   rpcYuvRec,
225                                  Bool        bSkipRes );
226#if H_3D_INTER_SDC
227  Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU,
228    TComYuv* pcOrg, 
229    TComYuv* pcPred, 
230    TComYuv* pcResi, 
231    TComYuv* pcRec, 
232    Int      uiOffset,
233    const UInt uiDepth );
234#endif
235  /// set ME search range
236  Void setAdaptiveSearchRange   ( Int iDir, Int iRefIdx, Int iSearchRange) { m_aaiAdaptSR[iDir][iRefIdx] = iSearchRange; }
237 
238  Void xEncPCM    (TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piOrg, Pel* piPCM, Pel* piPred, Pel* piResi, Pel* piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, TextType eText);
239  Void IPCMSearch (TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv );
240protected:
241 
242  // -------------------------------------------------------------------------------------------------------------------
243  // Intra search
244  // -------------------------------------------------------------------------------------------------------------------
245 
246  Void  xEncSubdivCbfQT           ( TComDataCU*  pcCU,
247                                    UInt         uiTrDepth,
248                                    UInt         uiAbsPartIdx,
249                                    Bool         bLuma,
250                                    Bool         bChroma );
251
252  Void  xEncCoeffQT               ( TComDataCU*  pcCU,
253                                    UInt         uiTrDepth,
254                                    UInt         uiAbsPartIdx,
255                                    TextType     eTextType,
256                                    Bool         bRealCoeff );
257  Void  xEncIntraHeader           ( TComDataCU*  pcCU,
258                                    UInt         uiTrDepth,
259                                    UInt         uiAbsPartIdx,
260                                    Bool         bLuma,
261                                    Bool         bChroma );
262  UInt  xGetIntraBitsQT           ( TComDataCU*  pcCU,
263                                    UInt         uiTrDepth,
264                                    UInt         uiAbsPartIdx,
265                                    Bool         bLuma,
266                                    Bool         bChroma,
267                                    Bool         bRealCoeff );
268  UInt  xGetIntraBitsQTChroma    ( TComDataCU*   pcCU,
269                                   UInt          uiTrDepth,
270                                   UInt          uiAbsPartIdx,
271                                   UInt          uiChromaId,
272                                   Bool          bRealCoeff );
273 
274  Void  xIntraCodingLumaBlk       ( TComDataCU*  pcCU,
275                                    UInt         uiTrDepth,
276                                    UInt         uiAbsPartIdx,
277                                    TComYuv*     pcOrgYuv, 
278                                    TComYuv*     pcPredYuv, 
279                                    TComYuv*     pcResiYuv, 
280#if H_3D_VSO
281                                    Dist&        ruiDist,
282#else
283                                    UInt&        ruiDist,
284#endif
285                                    Int         default0Save1Load2 = 0
286#if H_3D_DIM_ENC
287                                  , Bool          zeroResi = false
288#endif
289                                    );
290  Void  xIntraCodingChromaBlk     ( TComDataCU*  pcCU,
291                                    UInt         uiTrDepth,
292                                    UInt         uiAbsPartIdx,
293                                    TComYuv*     pcOrgYuv, 
294                                    TComYuv*     pcPredYuv, 
295                                    TComYuv*     pcResiYuv, 
296                                    UInt&        ruiDist,
297                                    UInt         uiChromaId,
298                                    Int          default0Save1Load2 = 0 );
299
300  Void  xRecurIntraCodingQT       ( TComDataCU*  pcCU, 
301                                    UInt         uiTrDepth,
302                                    UInt         uiAbsPartIdx, 
303                                    Bool         bLumaOnly,
304                                    TComYuv*     pcOrgYuv, 
305                                    TComYuv*     pcPredYuv, 
306                                    TComYuv*     pcResiYuv, 
307#if H_3D_VSO
308                                    Dist&        ruiDistY,
309#else
310                                    UInt&        ruiDistY,
311#endif
312                                    UInt&        ruiDistC,
313#if HHI_RQT_INTRA_SPEEDUP
314                                   Bool         bCheckFirst,
315#endif
316                                   Double&      dRDCost
317#if H_3D_DIM_ENC
318                                   , Bool          zeroResi = false
319#endif
320                                   );
321 
322  Void  xSetIntraResultQT         ( TComDataCU*  pcCU,
323                                    UInt         uiTrDepth,
324                                    UInt         uiAbsPartIdx,
325                                    Bool         bLumaOnly,
326                                    TComYuv*     pcRecoYuv );
327 
328  Void  xRecurIntraChromaCodingQT ( TComDataCU*  pcCU, 
329                                    UInt         uiTrDepth,
330                                    UInt         uiAbsPartIdx, 
331                                    TComYuv*     pcOrgYuv, 
332                                    TComYuv*     pcPredYuv, 
333                                    TComYuv*     pcResiYuv, 
334                                    UInt&        ruiDist );
335  Void  xSetIntraResultChromaQT   ( TComDataCU*  pcCU,
336                                    UInt         uiTrDepth,
337                                    UInt         uiAbsPartIdx,
338                                    TComYuv*     pcRecoYuv );
339 
340  Void  xStoreIntraResultQT       ( TComDataCU*  pcCU,
341                                    UInt         uiTrDepth,
342                                    UInt         uiAbsPartIdx,
343                                    Bool         bLumaOnly );
344  Void  xLoadIntraResultQT        ( TComDataCU*  pcCU,
345                                    UInt         uiTrDepth,
346                                    UInt         uiAbsPartIdx,
347                                    Bool         bLumaOnly );
348  Void xStoreIntraResultChromaQT  ( TComDataCU*  pcCU,
349                                    UInt         uiTrDepth,
350                                    UInt         uiAbsPartIdx,
351                                    UInt         stateU0V1Both2 );
352  Void xLoadIntraResultChromaQT   ( TComDataCU*  pcCU,
353                                    UInt         uiTrDepth,
354                                    UInt         uiAbsPartIdx,
355                                    UInt         stateU0V1Both2 );
356#if MTK_SINGLE_DEPTH_MODE_I0095
357  Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor );
358#endif
359#if H_3D_DIM
360  // -------------------------------------------------------------------------------------------------------------------
361  // Depth intra search
362  // -------------------------------------------------------------------------------------------------------------------
363  Void xCalcBiSegDCs              ( Pel* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& valDC1, Pel& valDC2 );
364#if H_3D_DIM_DMM
365  Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
366  Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
367#endif
368#if H_3D_DIM_SDC
369  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
370#endif
371#endif
372
373  // -------------------------------------------------------------------------------------------------------------------
374  // Inter search (AMP)
375  // -------------------------------------------------------------------------------------------------------------------
376 
377  Void xEstimateMvPredAMVP        ( TComDataCU* pcCU,
378                                    TComYuv*    pcOrgYuv,
379                                    UInt        uiPartIdx,
380                                    RefPicList  eRefPicList,
381                                    Int         iRefIdx,
382                                    TComMv&     rcMvPred,
383                                    Bool        bFilled = false
384                                  , UInt*       puiDistBiP = NULL
385                                  #if ZERO_MVD_EST
386                                  , UInt*       puiDist = NULL
387                                  #endif
388                                     );
389 
390  Void xCheckBestMVP              ( TComDataCU* pcCU,
391                                    RefPicList  eRefPicList,
392                                    TComMv      cMv,
393                                    TComMv&     rcMvPred,
394                                    Int&        riMVPIdx,
395                                    UInt&       ruiBits,
396                                    UInt&       ruiCost );
397 
398  UInt xGetTemplateCost           ( TComDataCU* pcCU,
399                                    UInt        uiPartIdx,
400                                    UInt        uiPartAddr,
401                                    TComYuv*    pcOrgYuv,
402                                    TComYuv*    pcTemplateCand,
403                                    TComMv      cMvCand,
404                                    Int         iMVPIdx,
405                                    Int         iMVPNum,
406                                    RefPicList  eRefPicList,
407                                    Int         iRefIdx,
408                                    Int         iSizeX,
409                                    Int         iSizeY
410                                  #if ZERO_MVD_EST
411                                  , UInt&       ruiDist
412                                  #endif
413                                   );
414 
415 
416  Void xCopyAMVPInfo              ( AMVPInfo*   pSrc, AMVPInfo* pDst );
417  UInt xGetMvpIdxBits             ( Int iIdx, Int iNum );
418  Void xGetBlkBits                ( PartSize  eCUMode, Bool bPSlice, Int iPartIdx,  UInt uiLastMode, UInt uiBlkBit[3]);
419 
420  Void xMergeEstimation           ( TComDataCU*     pcCU,
421                                    TComYuv*        pcYuvOrg,
422                                    Int             iPartIdx,
423                                    UInt&           uiInterDir,
424                                    TComMvField*    pacMvField,
425                                    UInt&           uiMergeIndex,
426                                    UInt&           ruiCost
427                                  , TComMvField* cMvFieldNeighbours, 
428                                    UChar* uhInterDirNeighbours
429#if H_3D_VSP
430                                  , Int* vspFlag
431                                  , InheritedVSPDisInfo*  inheritedVSPDisInfo
432#endif
433#if H_3D_SPIVMP
434                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
435#endif
436                                  , Int& numValidMergeCand
437                                   );
438
439  Void xRestrictBipredMergeCand   ( TComDataCU*     pcCU,
440                                    UInt            puIdx,
441                                    TComMvField*    mvFieldNeighbours, 
442                                    UChar*          interDirNeighbours, 
443#if H_3D_VSP
444                                    Int* vspFlag,
445#endif
446                                    Int             numValidMergeCand );
447
448  // -------------------------------------------------------------------------------------------------------------------
449  // motion estimation
450  // -------------------------------------------------------------------------------------------------------------------
451 
452  Void xMotionEstimation          ( TComDataCU*   pcCU,
453                                    TComYuv*      pcYuvOrg,
454                                    Int           iPartIdx,
455                                    RefPicList    eRefPicList,
456                                    TComMv*       pcMvPred,
457                                    Int           iRefIdxPred,
458                                    TComMv&       rcMv,
459                                    UInt&         ruiBits,
460                                    UInt&         ruiCost,
461                                    Bool          bBi = false  );
462 
463  Void xTZSearch                  ( TComDataCU*   pcCU,
464                                    TComPattern*  pcPatternKey,
465                                    Pel*          piRefY,
466                                    Int           iRefStride,
467                                    TComMv*       pcMvSrchRngLT,
468                                    TComMv*       pcMvSrchRngRB,
469                                    TComMv&       rcMv,
470                                    UInt&         ruiSAD );
471 
472  Void xSetSearchRange            ( TComDataCU*   pcCU,
473                                    TComMv&       cMvPred,
474                                    Int           iSrchRng,
475                                    TComMv&       rcMvSrchRngLT,
476                                    TComMv&       rcMvSrchRngRB );
477 
478  Void xPatternSearchFast         ( TComDataCU*   pcCU,
479                                    TComPattern*  pcPatternKey,
480                                    Pel*          piRefY,
481                                    Int           iRefStride,
482                                    TComMv*       pcMvSrchRngLT,
483                                    TComMv*       pcMvSrchRngRB,
484                                    TComMv&       rcMv,
485                                    UInt&         ruiSAD );
486 
487  Void xPatternSearch             ( TComPattern*  pcPatternKey,
488                                    Pel*          piRefY,
489                                    Int           iRefStride,
490                                    TComMv*       pcMvSrchRngLT,
491                                    TComMv*       pcMvSrchRngRB,
492                                    TComMv&       rcMv,
493                                    UInt&         ruiSAD );
494 
495  Void xPatternSearchFracDIF      ( TComDataCU*   pcCU,
496                                    TComPattern*  pcPatternKey,
497                                    Pel*          piRefY,
498                                    Int           iRefStride,
499                                    TComMv*       pcMvInt,
500                                    TComMv&       rcMvHalf,
501                                    TComMv&       rcMvQter,
502                                    UInt&         ruiCost
503                                   ,Bool biPred
504                                   );
505 
506  Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred  );
507  Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred );
508 
509  // -------------------------------------------------------------------------------------------------------------------
510  // T & Q & Q-1 & T-1
511  // -------------------------------------------------------------------------------------------------------------------
512 
513  Void xEncodeResidualQT( TComDataCU* pcCU, UInt uiAbsPartIdx, const UInt uiDepth, Bool bSubdivAndCbf, TextType eType );
514#if H_3D_VSO // M26
515  Void xEstimateResidualQT( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx, UInt absTUPartIdx,TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, const UInt uiDepth, Double &rdCost, UInt &ruiBits, Dist &ruiDist, Dist *puiZeroDist );
516#else
517  Void xEstimateResidualQT( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx, UInt absTUPartIdx,TComYuv* pcResi, const UInt uiDepth, Double &rdCost, UInt &ruiBits, UInt &ruiDist, UInt *puiZeroDist );
518#endif
519  Void xSetResidualQTData( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx,UInt absTUPartIdx, TComYuv* pcResi, UInt uiDepth, Bool bSpatial );
520 
521  UInt  xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPU, UInt uiPartOffset, UInt uiDepth, UInt uiInitTrDepth );
522  UInt  xUpdateCandList( UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double * CandCostList );
523 
524  // -------------------------------------------------------------------------------------------------------------------
525  // compute symbol bits
526  // -------------------------------------------------------------------------------------------------------------------
527 
528  Void xAddSymbolBitsInter        ( TComDataCU*   pcCU,
529                                   UInt          uiQp,
530                                   UInt          uiTrMode,
531                                   UInt&         ruiBits,
532                                   TComYuv*&     rpcYuvRec,
533                                   TComYuv*      pcYuvPred,
534                                   TComYuv*&     rpcYuvResi );
535 
536  Void  setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx, RefPicList eRefPicListCur );
537  inline  Void  setDistParamComp( UInt uiComp )  { m_cDistParam.uiComp = uiComp; }
538 
539};// END CLASS DEFINITION TEncSearch
540
541//! \}
542
543#endif // __TENCSEARCH__
Note: See TracBrowser for help on using the repository browser.