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

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

Merged HTM-16.0-dev1@1395.

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