source: 3DVCSoftware/trunk/source/Lib/TLibEncoder/TEncSearch.h @ 1313

Last change on this file since 1313 was 1313, checked in by tech, 9 years ago

Merged 14.1-update-dev1@1312.

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