source: 3DVCSoftware/branches/HTM-15.2-dev/source/Lib/TLibEncoder/TEncSearch.h @ 1370

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

Update to HM-16.7.

  • Property svn:eol-style set to native
File size: 25.9 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-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
34/** \file     TEncSearch.h
35    \brief    encoder search class (header)
36*/
37#ifndef __TENCSEARCH__
38#define __TENCSEARCH__
39
40// Include files
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"
47#include "TLibCommon/TComRectangle.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
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
65/// encoder search class
66class TEncSearch : public TComPrediction
67{
68private:
69  TCoeff**        m_ppcQTTempCoeff[MAX_NUM_COMPONENT /* 0->Y, 1->Cb, 2->Cr*/];
70#if ADAPTIVE_QP_SELECTION
71  TCoeff**        m_ppcQTTempArlCoeff[MAX_NUM_COMPONENT];
72#endif
73  UChar*          m_puhQTTempTrIdx;
74  UChar*          m_puhQTTempCbf[MAX_NUM_COMPONENT];
75
76  TComYuv*        m_pcQTTempTComYuv;
77  TComYuv         m_tmpYuvPred; // To be used in xGetInterPredictionError() to avoid constant memory allocation/deallocation
78
79  SChar*          m_phQTTempCrossComponentPredictionAlpha[MAX_NUM_COMPONENT];
80  Pel*            m_pSharedPredTransformSkip[MAX_NUM_COMPONENT];
81  TCoeff*         m_pcQTTempTUCoeff[MAX_NUM_COMPONENT];
82  UChar*          m_puhQTTempTransformSkipFlag[MAX_NUM_COMPONENT];
83  TComYuv         m_pcQTTempTransformSkipTComYuv;
84#if ADAPTIVE_QP_SELECTION
85  TCoeff*         m_ppcQTTempTUArlCoeff[MAX_NUM_COMPONENT];
86#endif
87
88protected:
89  // interface to option
90  TEncCfg*        m_pcEncCfg;
91
92  // interface to classes
93  TComTrQuant*    m_pcTrQuant;
94  TComRdCost*     m_pcRdCost;
95  TEncEntropy*    m_pcEntropyCoder;
96
97  // ME parameters
98  Int             m_iSearchRange;
99  Int             m_bipredSearchRange; // Search range for bi-prediction
100  MESearchMethod  m_motionEstimationSearchMethod;
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
107  // RD computation
108  TEncSbac***     m_pppcRDSbacCoder;
109  TEncSbac*       m_pcRDGoOnSbacCoder;
110  DistParam       m_cDistParam;
111
112  // Misc.
113  Pel*            m_pTempPel;
114
115#if NH_3D_VSO // M17
116  TComYuv         m_cYuvRecTemp; 
117#endif
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
121
122  TComMv          m_integerMv2Nx2N[NUM_REF_PIC_LIST_01][MAX_NUM_REF];
123
124  Bool            m_isInitialized;
125public:
126  TEncSearch();
127  virtual ~TEncSearch();
128
129  Void init(TEncCfg*      pcEncCfg,
130            TComTrQuant*  pcTrQuant,
131            Int           iSearchRange,
132            Int           bipredSearchRange,
133            MESearchMethod motionEstimationSearchMethod,
134            const UInt    maxCUWidth,
135            const UInt    maxCUHeight,
136            const UInt    maxTotalCUDepth,
137            TEncEntropy*  pcEntropyCoder,
138            TComRdCost*   pcRdCost,
139            TEncSbac***   pppcRDSbacCoder,
140            TEncSbac*     pcRDGoOnSbacCoder );
141
142  Void destroy();
143
144protected:
145
146  /// sub-function for motion vector refinement used in fractional-pel accuracy
147  Distortion  xPatternRefinement( TComPattern* pcPatternKey,
148                                  TComMv baseRefMv,
149                                  Int iFrac, TComMv& rcMvFrac, Bool bAllowUseOfHadamard
150                                 );
151
152  typedef struct
153  {
154    const Pel*  piRefY;
155    Int         iYStride;
156    Int         iBestX;
157    Int         iBestY;
158    UInt        uiBestRound;
159    UInt        uiBestDistance;
160    Distortion  uiBestSad;
161    UChar       ucPointNr;
162  } IntTZSearchStruct;
163
164  // sub-functions for ME
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 );
169
170  Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, Distortion& ruiSAD, Bool Hadamard );
171
172public:
173  Void  estIntraPredLumaQT      ( TComDataCU* pcCU,
174                                  TComYuv*    pcOrgYuv,
175                                  TComYuv*    pcPredYuv,
176                                  TComYuv*    pcResiYuv,
177                                  TComYuv*    pcRecoYuv,
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
181                                , Bool        bOnlyIVP
182#endif
183                                );
184
185  Void  estIntraPredChromaQT    ( TComDataCU* pcCU,
186                                  TComYuv*    pcOrgYuv,
187                                  TComYuv*    pcPredYuv,
188                                  TComYuv*    pcResiYuv,
189                                  TComYuv*    pcRecoYuv,
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
193  Void  estIntraPredDIS        ( TComDataCU* pcCU, 
194                                 TComYuv*    pcOrgYuv, 
195                                 TComYuv*    pcPredYuv, 
196                                 TComYuv*    pcResiYuv, 
197                                 TComYuv*    pcRecoYuv,
198                                 UInt&       ruiDistC,
199                                 Bool        bLumaOnly );
200#endif 
201
202  /// encoder estimation - inter prediction (non-skip)
203  Void predInterSearch          ( TComDataCU* pcCU,
204                                  TComYuv*    pcOrgYuv,
205                                  TComYuv*    pcPredYuv,
206                                  TComYuv*    pcResiYuv,
207                                  TComYuv*    pcRecoYuv
208                                  DEBUG_STRING_FN_DECLARE(sDebug),
209#if NH_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*    pcYuvResi,
223                                  TComYuv*    pcYuvResiBest,
224                                  TComYuv*    pcYuvRec,
225                                  Bool        bSkipResidual
226                                  DEBUG_STRING_FN_DECLARE(sDebug) );
227#if NH_3D_SDC_INTER
228  Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU,
229                                     TComYuv* pcOrg, 
230                                     TComYuv* pcPred, 
231                                     TComYuv* pcResi, 
232                                     TComYuv* pcRec, 
233                                     Int      uiOffset,
234                                     const UInt uiDepth );
235#endif
236
237  /// set ME search range
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 );
242protected:
243
244  // -------------------------------------------------------------------------------------------------------------------
245  // Intra search
246  // -------------------------------------------------------------------------------------------------------------------
247
248  Void  xEncSubdivCbfQT           ( TComTU      &rTu,
249                                    Bool         bLuma,
250                                    Bool         bChroma );
251
252  Void  xEncCoeffQT               ( TComTU &rTu,
253                                    ComponentID  component,
254                                    Bool         bRealCoeff );
255  Void  xEncIntraHeader           ( TComDataCU*  pcCU,
256                                    UInt         uiTrDepth,
257                                    UInt         uiAbsPartIdx,
258                                    Bool         bLuma,
259                                    Bool         bChroma );
260  UInt  xGetIntraBitsQT           ( TComTU &rTu,
261                                    Bool         bLuma,
262                                    Bool         bChroma,
263                                    Bool         bRealCoeff );
264
265  UInt  xGetIntraBitsQTChroma    ( TComTU &rTu,
266                                   ComponentID compID,
267                                   Bool          bRealCoeff );
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
275                                    Dist&        ruiDist,
276#else
277                                    Distortion&   ruiDist,
278#endif
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
285#endif
286                                   );
287
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
293                                    Dist&        ruiDistY,
294#else
295                                    Distortion& ruiDistY,
296#endif
297#if HHI_RQT_INTRA_SPEEDUP
298                                    Bool         bCheckFirst,
299#endif
300                                    Double&      dRDCost,
301                                    TComTU      &rTu
302                                    DEBUG_STRING_FN_DECLARE(sDebug)
303#if NH_3D_ENC_DEPTH
304                                  , Bool        zeroResiFlag = false
305#endif
306                                  );
307
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
319  SChar xCalcCrossComponentPredictionAlpha   (       TComTU &rTu,
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
345  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode );
346#endif
347
348#if NH_3D_DMM
349  // -------------------------------------------------------------------------------------------------------------------
350  // Depth intra search
351  // -------------------------------------------------------------------------------------------------------------------
352
353  Void xCalcBiSegDCs              ( Pel* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& valDC1, Pel& valDC2, Pel defaultVal, Bool subSamp = false );
354  Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
355  Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
356#endif
357#if NH_3D_SDC_INTRA
358  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
359  Void xCalcConstantSDC           ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC );
360#endif
361
362
363  // -------------------------------------------------------------------------------------------------------------------
364  // Inter search (AMP)
365  // -------------------------------------------------------------------------------------------------------------------
366
367  Void xEstimateMvPredAMVP        ( TComDataCU* pcCU,
368                                    TComYuv*    pcOrgYuv,
369                                    UInt        uiPartIdx,
370                                    RefPicList  eRefPicList,
371                                    Int         iRefIdx,
372                                    TComMv&     rcMvPred,
373                                    Bool        bFilled = false
374                                  , Distortion* puiDistBiP = NULL
375                                     );
376
377  Void xCheckBestMVP              ( TComDataCU* pcCU,
378                                    RefPicList  eRefPicList,
379                                    TComMv      cMv,
380                                    TComMv&     rcMvPred,
381                                    Int&        riMVPIdx,
382                                    UInt&       ruiBits,
383                                    Distortion& ruiCost );
384
385  Distortion xGetTemplateCost    ( TComDataCU*  pcCU,
386                                    UInt        uiPartAddr,
387                                    TComYuv*    pcOrgYuv,
388                                    TComYuv*    pcTemplateCand,
389                                    TComMv      cMvCand,
390                                    Int         iMVPIdx,
391                                    Int         iMVPNum,
392                                    RefPicList  eRefPicList,
393                                    Int         iRefIdx,
394                                    Int         iSizeX,
395                                    Int         iSizeY
396                                   );
397
398
399  Void xCopyAMVPInfo              ( AMVPInfo*   pSrc, AMVPInfo* pDst );
400  UInt xGetMvpIdxBits             ( Int iIdx, Int iNum );
401  Void xGetBlkBits                ( PartSize  eCUMode, Bool bPSlice, Int iPartIdx,  UInt uiLastMode, UInt uiBlkBit[3]);
402
403  Void xMergeEstimation           ( TComDataCU*  pcCU,
404                                    TComYuv*     pcYuvOrg,
405                                    Int          iPartIdx,
406                                    UInt&        uiInterDir,
407                                    TComMvField* pacMvField,
408                                    UInt&        uiMergeIndex,
409                                    Distortion&  ruiCost,
410                                    TComMvField* cMvFieldNeighbours,
411                                    UChar*       uhInterDirNeighbours,
412                                    Int&         numValidMergeCand
413#if NH_3D_VSP
414                                  , Int* vspFlag
415#endif
416#if NH_3D_SPIVMP
417                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
418#endif
419                                   );
420
421  Void xRestrictBipredMergeCand   ( TComDataCU*     pcCU,
422                                    UInt            puIdx,
423                                    TComMvField*    mvFieldNeighbours,
424                                    UChar*          interDirNeighbours,
425                                    Int             numValidMergeCand );
426
427
428  // -------------------------------------------------------------------------------------------------------------------
429  // motion estimation
430  // -------------------------------------------------------------------------------------------------------------------
431
432  Void xMotionEstimation          ( TComDataCU*  pcCU,
433                                    TComYuv*     pcYuvOrg,
434                                    Int          iPartIdx,
435                                    RefPicList   eRefPicList,
436                                    TComMv*      pcMvPred,
437                                    Int          iRefIdxPred,
438                                    TComMv&      rcMv,
439                                    UInt&        ruiBits,
440                                    Distortion&  ruiCost,
441                                    Bool         bBi = false  );
442
443  Void xTZSearch                  ( const TComDataCU* const  pcCU,
444                                    const TComPattern* const pcPatternKey,
445                                    const Pel* const         piRefY,
446                                    const Int                iRefStride,
447                                    const TComMv* const      pcMvSrchRngLT,
448                                    const TComMv* const      pcMvSrchRngRB,
449                                    TComMv&      rcMv,
450                                    Distortion&  ruiSAD,
451                                    const TComMv* const      pIntegerMv2Nx2NPred,
452                                    const Bool               bExtendedSettings
453                                    );
454
455  Void xTZSearchSelective         ( const TComDataCU* const  pcCU,
456                                    const TComPattern* const pcPatternKey,
457                                    const Pel* const         piRefY,
458                                    const Int                iRefStride,
459                                    const TComMv* const      pcMvSrchRngLT,
460                                    const TComMv* const      pcMvSrchRngRB,
461                                    TComMv&      rcMv,
462                                    Distortion&  ruiSAD,
463                                    const TComMv* const      pIntegerMv2Nx2NPred
464                                    );
465
466  Void xSetSearchRange            ( const TComDataCU* const pcCU,
467                                    const TComMv&      cMvPred,
468                                    const Int          iSrchRng,
469                                    TComMv&      rcMvSrchRngLT,
470                                    TComMv&      rcMvSrchRngRB );
471
472  Void xPatternSearchFast         ( const TComDataCU* const  pcCU,
473                                    const TComPattern* const pcPatternKey,
474                                    const Pel* const         piRefY,
475                                    const Int                iRefStride,
476                                    const TComMv* const      pcMvSrchRngLT,
477                                    const TComMv* const      pcMvSrchRngRB,
478                                    TComMv&      rcMv,
479                                    Distortion&  ruiSAD,
480                                    const TComMv* const      pIntegerMv2Nx2NPred
481                                  );
482
483  Void xPatternSearch             ( const TComPattern* const pcPatternKey,
484                                    const Pel*               piRefY,
485                                    const Int                iRefStride,
486                                    const TComMv* const      pcMvSrchRngLT,
487                                    const TComMv* const      pcMvSrchRngRB,
488                                    TComMv&      rcMv,
489                                    Distortion&  ruiSAD );
490
491  Void xPatternSearchFracDIF      (
492                                    Bool         bIsLosslessCoded,
493                                    TComPattern* pcPatternKey,
494                                    Pel*         piRefY,
495                                    Int          iRefStride,
496                                    TComMv*      pcMvInt,
497                                    TComMv&      rcMvHalf,
498                                    TComMv&      rcMvQter,
499                                    Distortion&  ruiCost
500                                   );
501
502  Void xExtDIFUpSamplingH( TComPattern* pcPattern );
503  Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef );
504
505  // -------------------------------------------------------------------------------------------------------------------
506  // T & Q & Q-1 & T-1
507  // -------------------------------------------------------------------------------------------------------------------
508
509  Void xEncodeInterResidualQT( const ComponentID compID, TComTU &rTu );
510#if NH_3D_VSO // M26
511  Void xEstimateInterResidualQT( TComYuv* pcResi, TComYuv* pcOrg, TComYuv* pcPred,  Double &rdCost, UInt &ruiBits, Dist       &ruiDist, Dist       *puiZeroDist, TComTU &rTu DEBUG_STRING_FN_DECLARE(sDebug) );
512#else
513  Void xEstimateInterResidualQT( TComYuv* pcResi                                  , Double &rdCost, UInt &ruiBits, Distortion &ruiDist, Distortion *puiZeroDist, TComTU &rTu DEBUG_STRING_FN_DECLARE(sDebug) );
514#endif
515  Void xSetInterResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu  );
516
517  UInt  xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPartOffset, UInt uiDepth, const ChannelType compID );
518  UInt  xUpdateCandList( UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double * CandCostList );
519
520  // -------------------------------------------------------------------------------------------------------------------
521  // compute symbol bits
522  // -------------------------------------------------------------------------------------------------------------------
523
524  Void xAddSymbolBitsInter       ( TComDataCU*   pcCU,
525                                   UInt&         ruiBits);
526
527  Void  setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx, RefPicList eRefPicListCur );
528  inline  Void  setDistParamComp( ComponentID compIdx )  { m_cDistParam.compIdx = compIdx; }
529
530};// END CLASS DEFINITION TEncSearch
531
532//! \}
533
534#endif // __TENCSEARCH__
Note: See TracBrowser for help on using the repository browser.