source: 3DVCSoftware/branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncSearch.h @ 1417

Last change on this file since 1417 was 559, checked in by mediatek-htm, 12 years ago

Integration of JCT3V-E0173, fast texture encoding algorithm for dependent views
The MACRO is "MTK_FAST_TEXTURE_ENCODING_E0173"

by Na Zhang (Na.Zhang@…)

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