source: 3DVCSoftware/branches/HTM-15.0-dev0/source/Lib/TLibEncoder/TEncSearch.h @ 1317

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

Clean-ups. HLS.

  • Property svn:eol-style set to native
File size: 25.5 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  TCoeff*         m_pcQTTempCoeff[MAX_NUM_COMPONENT];
71#if ADAPTIVE_QP_SELECTION
72  TCoeff**        m_ppcQTTempArlCoeff[MAX_NUM_COMPONENT];
73  TCoeff*         m_pcQTTempArlCoeff[MAX_NUM_COMPONENT];
74#endif
75  UChar*          m_puhQTTempTrIdx;
76  UChar*          m_puhQTTempCbf[MAX_NUM_COMPONENT];
77
78  TComYuv*        m_pcQTTempTComYuv;
79  TComYuv         m_tmpYuvPred; // To be used in xGetInterPredictionError() to avoid constant memory allocation/deallocation
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];
85  TComYuv         m_pcQTTempTransformSkipTComYuv;
86#if ADAPTIVE_QP_SELECTION
87  TCoeff*         m_ppcQTTempTUArlCoeff[MAX_NUM_COMPONENT];
88#endif
89
90protected:
91  // interface to option
92  TEncCfg*        m_pcEncCfg;
93
94  // interface to classes
95  TComTrQuant*    m_pcTrQuant;
96  TComRdCost*     m_pcRdCost;
97  TEncEntropy*    m_pcEntropyCoder;
98
99  // ME parameters
100  Int             m_iSearchRange;
101  Int             m_bipredSearchRange; // Search range for bi-prediction
102  Int             m_iFastSearch;
103#if NH_MV
104  Bool            m_vertRestriction; 
105#endif
106  Int             m_aaiAdaptSR[MAX_NUM_REF_LIST_ADAPT_SR][MAX_IDX_ADAPT_SR];
107  TComMv          m_cSrchRngLT;
108  TComMv          m_cSrchRngRB;
109  TComMv          m_acMvPredictors[NUM_MV_PREDICTORS]; // Left, Above, AboveRight. enum MVP_DIR first NUM_MV_PREDICTORS entries are suitable for accessing.
110
111  // RD computation
112  TEncSbac***     m_pppcRDSbacCoder;
113  TEncSbac*       m_pcRDGoOnSbacCoder;
114  DistParam       m_cDistParam;
115
116  // Misc.
117  Pel*            m_pTempPel;
118  const UInt*     m_puiDFilter;
119
120#if NH_3D_VSO // M17
121  TComYuv         m_cYuvRecTemp; 
122#endif
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
126
127  TComMv          m_integerMv2Nx2N[NUM_REF_PIC_LIST_01][MAX_NUM_REF];
128
129  Bool            m_isInitialized;
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            const UInt    maxCUWidth,
140            const UInt    maxCUHeight,
141            const UInt    maxTotalCUDepth,
142            TEncEntropy*  pcEntropyCoder,
143            TComRdCost*   pcRdCost,
144            TEncSbac***   pppcRDSbacCoder,
145            TEncSbac*     pcRDGoOnSbacCoder );
146
147  Void destroy();
148
149protected:
150
151  /// sub-function for motion vector refinement used in fractional-pel accuracy
152  Distortion  xPatternRefinement( TComPattern* pcPatternKey,
153                                  TComMv baseRefMv,
154                                  Int iFrac, TComMv& rcMvFrac, Bool bAllowUseOfHadamard
155                                 );
156
157  typedef struct
158  {
159    Pel*        piRefY;
160    Int         iYStride;
161    Int         iBestX;
162    Int         iBestY;
163    UInt        uiBestRound;
164    UInt        uiBestDistance;
165    Distortion  uiBestSad;
166    UChar       ucPointNr;
167  } IntTZSearchStruct;
168
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
175  Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, Distortion& ruiSAD, Bool Hadamard );
176
177public:
178  Void  estIntraPredLumaQT      ( TComDataCU* pcCU,
179                                  TComYuv*    pcOrgYuv,
180                                  TComYuv*    pcPredYuv,
181                                  TComYuv*    pcResiYuv,
182                                  TComYuv*    pcRecoYuv,
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
186                                , Bool        bOnlyIVP
187#endif
188                                );
189
190  Void  estIntraPredChromaQT    ( TComDataCU* pcCU,
191                                  TComYuv*    pcOrgYuv,
192                                  TComYuv*    pcPredYuv,
193                                  TComYuv*    pcResiYuv,
194                                  TComYuv*    pcRecoYuv,
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
198  Void  estIntraPredDIS        ( TComDataCU* pcCU, 
199                                 TComYuv*    pcOrgYuv, 
200                                 TComYuv*    pcPredYuv, 
201                                 TComYuv*    pcResiYuv, 
202                                 TComYuv*    pcRecoYuv,
203                                 UInt&       ruiDistC,
204                                 Bool        bLumaOnly );
205#endif 
206
207  /// encoder estimation - inter prediction (non-skip)
208  Void predInterSearch          ( TComDataCU* pcCU,
209                                  TComYuv*    pcOrgYuv,
210                                  TComYuv*    pcPredYuv,
211                                  TComYuv*    pcResiYuv,
212                                  TComYuv*    pcRecoYuv
213                                  DEBUG_STRING_FN_DECLARE(sDebug),
214#if NH_3D_FAST_TEXTURE_ENCODING
215                                  Bool        bFMD,
216#endif
217                                  Bool        bUseRes = false
218#if AMP_MRG
219                                 ,Bool        bUseMRG = false
220#endif
221                                );
222
223  /// encode residual and compute rd-cost for inter mode
224  Void encodeResAndCalcRdInterCU( TComDataCU* pcCU,
225                                  TComYuv*    pcYuvOrg,
226                                  TComYuv*    pcYuvPred,
227                                  TComYuv*    pcYuvResi,
228                                  TComYuv*    pcYuvResiBest,
229                                  TComYuv*    pcYuvRec,
230                                  Bool        bSkipResidual
231                                  DEBUG_STRING_FN_DECLARE(sDebug) );
232#if NH_3D_SDC_INTER
233  Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU,
234                                     TComYuv* pcOrg, 
235                                     TComYuv* pcPred, 
236                                     TComYuv* pcResi, 
237                                     TComYuv* pcRec, 
238                                     Int      uiOffset,
239                                     const UInt uiDepth );
240#endif
241
242  /// set ME search range
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 );
247protected:
248
249  // -------------------------------------------------------------------------------------------------------------------
250  // Intra search
251  // -------------------------------------------------------------------------------------------------------------------
252
253  Void  xEncSubdivCbfQT           ( TComTU      &rTu,
254                                    Bool         bLuma,
255                                    Bool         bChroma );
256
257  Void  xEncCoeffQT               ( TComTU &rTu,
258                                    ComponentID  component,
259                                    Bool         bRealCoeff );
260  Void  xEncIntraHeader           ( TComDataCU*  pcCU,
261                                    UInt         uiTrDepth,
262                                    UInt         uiAbsPartIdx,
263                                    Bool         bLuma,
264                                    Bool         bChroma );
265  UInt  xGetIntraBitsQT           ( TComTU &rTu,
266                                    Bool         bLuma,
267                                    Bool         bChroma,
268                                    Bool         bRealCoeff );
269
270  UInt  xGetIntraBitsQTChroma    ( TComTU &rTu,
271                                   ComponentID compID,
272                                   Bool          bRealCoeff );
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
280                                    Dist&        ruiDist,
281#else
282                                    Distortion&   ruiDist,
283#endif
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
290#endif
291                                   );
292
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
298                                    Dist&        ruiDistY,
299#else
300                                    Distortion& ruiDistY,
301#endif
302#if HHI_RQT_INTRA_SPEEDUP
303                                    Bool         bCheckFirst,
304#endif
305                                    Double&      dRDCost,
306                                    TComTU      &rTu
307                                    DEBUG_STRING_FN_DECLARE(sDebug)
308#if NH_3D_ENC_DEPTH
309                                  , Bool        zeroResiFlag = false
310#endif
311                                  );
312
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
350  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode );
351#endif
352
353#if NH_3D_DMM
354  // -------------------------------------------------------------------------------------------------------------------
355  // Depth intra search
356  // -------------------------------------------------------------------------------------------------------------------
357
358  Void xCalcBiSegDCs              ( Pel* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& valDC1, Pel& valDC2, Pel defaultVal, Bool subSamp = false );
359  Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
360  Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
361#endif
362#if NH_3D_SDC_INTRA
363  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
364  Void xCalcConstantSDC           ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC );
365#endif
366
367
368  // -------------------------------------------------------------------------------------------------------------------
369  // Inter search (AMP)
370  // -------------------------------------------------------------------------------------------------------------------
371
372  Void xEstimateMvPredAMVP        ( TComDataCU* pcCU,
373                                    TComYuv*    pcOrgYuv,
374                                    UInt        uiPartIdx,
375                                    RefPicList  eRefPicList,
376                                    Int         iRefIdx,
377                                    TComMv&     rcMvPred,
378                                    Bool        bFilled = false
379                                  , Distortion* puiDistBiP = NULL
380                                     );
381
382  Void xCheckBestMVP              ( TComDataCU* pcCU,
383                                    RefPicList  eRefPicList,
384                                    TComMv      cMv,
385                                    TComMv&     rcMvPred,
386                                    Int&        riMVPIdx,
387                                    UInt&       ruiBits,
388                                    Distortion& ruiCost );
389
390  Distortion xGetTemplateCost    ( TComDataCU*  pcCU,
391                                    UInt        uiPartAddr,
392                                    TComYuv*    pcOrgYuv,
393                                    TComYuv*    pcTemplateCand,
394                                    TComMv      cMvCand,
395                                    Int         iMVPIdx,
396                                    Int         iMVPNum,
397                                    RefPicList  eRefPicList,
398                                    Int         iRefIdx,
399                                    Int         iSizeX,
400                                    Int         iSizeY
401                                   );
402
403
404  Void xCopyAMVPInfo              ( AMVPInfo*   pSrc, AMVPInfo* pDst );
405  UInt xGetMvpIdxBits             ( Int iIdx, Int iNum );
406  Void xGetBlkBits                ( PartSize  eCUMode, Bool bPSlice, Int iPartIdx,  UInt uiLastMode, UInt uiBlkBit[3]);
407
408  Void xMergeEstimation           ( TComDataCU*  pcCU,
409                                    TComYuv*     pcYuvOrg,
410                                    Int          iPartIdx,
411                                    UInt&        uiInterDir,
412                                    TComMvField* pacMvField,
413                                    UInt&        uiMergeIndex,
414                                    Distortion&  ruiCost,
415                                    TComMvField* cMvFieldNeighbours,
416                                    UChar*       uhInterDirNeighbours,
417                                    Int&         numValidMergeCand
418#if NH_3D_VSP
419                                  , Int* vspFlag
420#endif
421#if NH_3D_SPIVMP
422                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
423#endif
424                                   );
425
426  Void xRestrictBipredMergeCand   ( TComDataCU*     pcCU,
427                                    UInt            puIdx,
428                                    TComMvField*    mvFieldNeighbours,
429                                    UChar*          interDirNeighbours,
430                                    Int             numValidMergeCand );
431
432
433  // -------------------------------------------------------------------------------------------------------------------
434  // motion estimation
435  // -------------------------------------------------------------------------------------------------------------------
436
437  Void xMotionEstimation          ( TComDataCU*  pcCU,
438                                    TComYuv*     pcYuvOrg,
439                                    Int          iPartIdx,
440                                    RefPicList   eRefPicList,
441                                    TComMv*      pcMvPred,
442                                    Int          iRefIdxPred,
443                                    TComMv&      rcMv,
444                                    UInt&        ruiBits,
445                                    Distortion&  ruiCost,
446                                    Bool         bBi = false  );
447
448  Void xTZSearch                  ( TComDataCU*  pcCU,
449                                    TComPattern* pcPatternKey,
450                                    Pel*         piRefY,
451                                    Int          iRefStride,
452                                    TComMv*      pcMvSrchRngLT,
453                                    TComMv*      pcMvSrchRngRB,
454                                    TComMv&      rcMv,
455                                    Distortion&  ruiSAD,
456                                    const TComMv *pIntegerMv2Nx2NPred
457                                    );
458
459  Void xTZSearchSelective         ( TComDataCU*  pcCU,
460                                    TComPattern* pcPatternKey,
461                                    Pel*         piRefY,
462                                    Int          iRefStride,
463                                    TComMv*      pcMvSrchRngLT,
464                                    TComMv*      pcMvSrchRngRB,
465                                    TComMv&      rcMv,
466                                    Distortion&  ruiSAD,
467                                    const TComMv *pIntegerMv2Nx2NPred
468                                    );
469
470  Void xSetSearchRange            ( TComDataCU*  pcCU,
471                                    TComMv&      cMvPred,
472                                    Int          iSrchRng,
473                                    TComMv&      rcMvSrchRngLT,
474                                    TComMv&      rcMvSrchRngRB );
475
476  Void xPatternSearchFast         ( TComDataCU*  pcCU,
477                                    TComPattern* pcPatternKey,
478                                    Pel*         piRefY,
479                                    Int          iRefStride,
480                                    TComMv*      pcMvSrchRngLT,
481                                    TComMv*      pcMvSrchRngRB,
482                                    TComMv&      rcMv,
483                                    Distortion&  ruiSAD,
484                                    const TComMv* pIntegerMv2Nx2NPred
485                                  );
486
487  Void xPatternSearch             ( TComPattern* pcPatternKey,
488                                    Pel*         piRefY,
489                                    Int          iRefStride,
490                                    TComMv*      pcMvSrchRngLT,
491                                    TComMv*      pcMvSrchRngRB,
492                                    TComMv&      rcMv,
493                                    Distortion&  ruiSAD );
494
495  Void xPatternSearchFracDIF      (
496                                    Bool         bIsLosslessCoded,
497                                    TComPattern* pcPatternKey,
498                                    Pel*         piRefY,
499                                    Int          iRefStride,
500                                    TComMv*      pcMvInt,
501                                    TComMv&      rcMvHalf,
502                                    TComMv&      rcMvQter,
503                                    Distortion&  ruiCost
504                                   );
505
506  Void xExtDIFUpSamplingH( TComPattern* pcPattern );
507  Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef );
508
509  // -------------------------------------------------------------------------------------------------------------------
510  // T & Q & Q-1 & T-1
511  // -------------------------------------------------------------------------------------------------------------------
512
513  Void xEncodeInterResidualQT( const ComponentID compID, TComTU &rTu );
514#if NH_3D_VSO // M26
515  Void xEstimateInterResidualQT( TComYuv* pcResi, TComYuv* pcOrg, TComYuv* pcPred,  Double &rdCost, UInt &ruiBits, Dist       &ruiDist, Dist       *puiZeroDist, TComTU &rTu DEBUG_STRING_FN_DECLARE(sDebug) );
516#else
517  Void xEstimateInterResidualQT( TComYuv* pcResi                                  , Double &rdCost, UInt &ruiBits, Distortion &ruiDist, Distortion *puiZeroDist, TComTU &rTu DEBUG_STRING_FN_DECLARE(sDebug) );
518#endif
519  Void xSetInterResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu  );
520
521  UInt  xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPartOffset, UInt uiDepth, const ChannelType compID );
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&         ruiBits);
530
531  Void  setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx, RefPicList eRefPicListCur );
532  inline  Void  setDistParamComp( ComponentID compIdx )  { m_cDistParam.compIdx = compIdx; }
533
534};// END CLASS DEFINITION TEncSearch
535
536//! \}
537
538#endif // __TENCSEARCH__
Note: See TracBrowser for help on using the repository browser.