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 | |
---|
55 | class TEncCu; |
---|
56 | |
---|
57 | // ==================================================================================================================== |
---|
58 | // Class definition |
---|
59 | // ==================================================================================================================== |
---|
60 | |
---|
61 | /// encoder search class |
---|
62 | class TEncSearch : public TComPrediction |
---|
63 | { |
---|
64 | private: |
---|
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 |
---|
95 | protected: |
---|
96 | // interface to option |
---|
97 | TEncCfg* m_pcEncCfg; |
---|
98 | |
---|
99 | #if SVC_EXTENSION |
---|
100 | TEncTop** m_ppcTEncTop; |
---|
101 | #endif |
---|
102 | |
---|
103 | // interface to classes |
---|
104 | TComTrQuant* m_pcTrQuant; |
---|
105 | TComRdCost* m_pcRdCost; |
---|
106 | TEncEntropy* m_pcEntropyCoder; |
---|
107 | |
---|
108 | // ME parameters |
---|
109 | Int m_iSearchRange; |
---|
110 | Int m_bipredSearchRange; // Search range for bi-prediction |
---|
111 | Int m_iFastSearch; |
---|
112 | Int m_aaiAdaptSR[2][33]; |
---|
113 | TComMv m_cSrchRngLT; |
---|
114 | TComMv m_cSrchRngRB; |
---|
115 | TComMv m_acMvPredictors[3]; |
---|
116 | |
---|
117 | // RD computation |
---|
118 | TEncSbac*** m_pppcRDSbacCoder; |
---|
119 | TEncSbac* m_pcRDGoOnSbacCoder; |
---|
120 | Bool m_bUseSBACRD; |
---|
121 | DistParam m_cDistParam; |
---|
122 | |
---|
123 | // Misc. |
---|
124 | Pel* m_pTempPel; |
---|
125 | const UInt* m_puiDFilter; |
---|
126 | Int m_iMaxDeltaQP; |
---|
127 | |
---|
128 | // AMVP cost computation |
---|
129 | // UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS]; |
---|
130 | UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS+1]; //th array bounds |
---|
131 | |
---|
132 | #if N0383_IL_CONSTRAINED_TILE_SETS_SEI |
---|
133 | Bool m_disableILP; |
---|
134 | #endif |
---|
135 | |
---|
136 | public: |
---|
137 | TEncSearch(); |
---|
138 | virtual ~TEncSearch(); |
---|
139 | |
---|
140 | Void init( TEncCfg* pcEncCfg, |
---|
141 | TComTrQuant* pcTrQuant, |
---|
142 | Int iSearchRange, |
---|
143 | Int bipredSearchRange, |
---|
144 | Int iFastSearch, |
---|
145 | Int iMaxDeltaQP, |
---|
146 | TEncEntropy* pcEntropyCoder, |
---|
147 | TComRdCost* pcRdCost, |
---|
148 | TEncSbac*** pppcRDSbacCoder, |
---|
149 | TEncSbac* pcRDGoOnSbacCoder ); |
---|
150 | |
---|
151 | protected: |
---|
152 | |
---|
153 | /// sub-function for motion vector refinement used in fractional-pel accuracy |
---|
154 | UInt xPatternRefinement( TComPattern* pcPatternKey, |
---|
155 | TComMv baseRefMv, |
---|
156 | Int iFrac, TComMv& rcMvFrac ); |
---|
157 | |
---|
158 | typedef struct |
---|
159 | { |
---|
160 | Pel* piRefY; |
---|
161 | Int iYStride; |
---|
162 | Int iBestX; |
---|
163 | Int iBestY; |
---|
164 | UInt uiBestRound; |
---|
165 | UInt uiBestDistance; |
---|
166 | UInt uiBestSad; |
---|
167 | UChar ucPointNr; |
---|
168 | } IntTZSearchStruct; |
---|
169 | |
---|
170 | // sub-functions for ME |
---|
171 | __inline Void xTZSearchHelp ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance ); |
---|
172 | __inline Void xTZ2PointSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB ); |
---|
173 | __inline Void xTZ8PointSquareSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist ); |
---|
174 | __inline Void xTZ8PointDiamondSearch( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist ); |
---|
175 | |
---|
176 | Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiSAD, Bool Hadamard ); |
---|
177 | |
---|
178 | public: |
---|
179 | Void preestChromaPredMode ( TComDataCU* pcCU, |
---|
180 | TComYuv* pcOrgYuv, |
---|
181 | TComYuv* pcPredYuv ); |
---|
182 | Void estIntraPredQT ( TComDataCU* pcCU, |
---|
183 | TComYuv* pcOrgYuv, |
---|
184 | TComYuv* pcPredYuv, |
---|
185 | TComYuv* pcResiYuv, |
---|
186 | TComYuv* pcRecoYuv, |
---|
187 | UInt& ruiDistC, |
---|
188 | Bool bLumaOnly ); |
---|
189 | Void estIntraPredChromaQT ( TComDataCU* pcCU, |
---|
190 | TComYuv* pcOrgYuv, |
---|
191 | TComYuv* pcPredYuv, |
---|
192 | TComYuv* pcResiYuv, |
---|
193 | TComYuv* pcRecoYuv, |
---|
194 | UInt uiPreCalcDistC ); |
---|
195 | |
---|
196 | /// encoder estimation - inter prediction (non-skip) |
---|
197 | Void predInterSearch ( TComDataCU* pcCU, |
---|
198 | TComYuv* pcOrgYuv, |
---|
199 | TComYuv*& rpcPredYuv, |
---|
200 | TComYuv*& rpcResiYuv, |
---|
201 | TComYuv*& rpcRecoYuv, |
---|
202 | Bool bUseRes = false |
---|
203 | #if AMP_MRG |
---|
204 | ,Bool bUseMRG = false |
---|
205 | #endif |
---|
206 | ); |
---|
207 | |
---|
208 | #if (ENCODER_FAST_MODE) |
---|
209 | Bool predInterSearchILRUni ( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, UInt refLayerId ); |
---|
210 | #endif |
---|
211 | |
---|
212 | /// encode residual and compute rd-cost for inter mode |
---|
213 | Void encodeResAndCalcRdInterCU( TComDataCU* pcCU, |
---|
214 | TComYuv* pcYuvOrg, |
---|
215 | TComYuv* pcYuvPred, |
---|
216 | TComYuv*& rpcYuvResi, |
---|
217 | TComYuv*& rpcYuvResiBest, |
---|
218 | TComYuv*& rpcYuvRec, |
---|
219 | Bool bSkipRes ); |
---|
220 | |
---|
221 | /// set ME search range |
---|
222 | Void setAdaptiveSearchRange ( Int iDir, Int iRefIdx, Int iSearchRange) { m_aaiAdaptSR[iDir][iRefIdx] = iSearchRange; } |
---|
223 | |
---|
224 | Void xEncPCM (TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piOrg, Pel* piPCM, Pel* piPred, Pel* piResi, Pel* piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, TextType eText); |
---|
225 | Void IPCMSearch (TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv ); |
---|
226 | |
---|
227 | #if N0383_IL_CONSTRAINED_TILE_SETS_SEI |
---|
228 | Void setDisableILP(Bool a) {m_disableILP = a;} |
---|
229 | #endif |
---|
230 | |
---|
231 | protected: |
---|
232 | |
---|
233 | // ------------------------------------------------------------------------------------------------------------------- |
---|
234 | // Intra search |
---|
235 | // ------------------------------------------------------------------------------------------------------------------- |
---|
236 | |
---|
237 | Void xEncSubdivCbfQT ( TComDataCU* pcCU, |
---|
238 | UInt uiTrDepth, |
---|
239 | UInt uiAbsPartIdx, |
---|
240 | Bool bLuma, |
---|
241 | Bool bChroma ); |
---|
242 | |
---|
243 | Void xEncCoeffQT ( TComDataCU* pcCU, |
---|
244 | UInt uiTrDepth, |
---|
245 | UInt uiAbsPartIdx, |
---|
246 | TextType eTextType, |
---|
247 | Bool bRealCoeff ); |
---|
248 | Void xEncIntraHeader ( TComDataCU* pcCU, |
---|
249 | UInt uiTrDepth, |
---|
250 | UInt uiAbsPartIdx, |
---|
251 | Bool bLuma, |
---|
252 | Bool bChroma ); |
---|
253 | UInt xGetIntraBitsQT ( TComDataCU* pcCU, |
---|
254 | UInt uiTrDepth, |
---|
255 | UInt uiAbsPartIdx, |
---|
256 | Bool bLuma, |
---|
257 | Bool bChroma, |
---|
258 | Bool bRealCoeff ); |
---|
259 | UInt xGetIntraBitsQTChroma ( TComDataCU* pcCU, |
---|
260 | UInt uiTrDepth, |
---|
261 | UInt uiAbsPartIdx, |
---|
262 | UInt uiChromaId, |
---|
263 | Bool bRealCoeff ); |
---|
264 | |
---|
265 | Void xIntraCodingLumaBlk ( TComDataCU* pcCU, |
---|
266 | UInt uiTrDepth, |
---|
267 | UInt uiAbsPartIdx, |
---|
268 | TComYuv* pcOrgYuv, |
---|
269 | TComYuv* pcPredYuv, |
---|
270 | TComYuv* pcResiYuv, |
---|
271 | UInt& ruiDist, |
---|
272 | Int default0Save1Load2 = 0); |
---|
273 | Void xIntraCodingChromaBlk ( TComDataCU* pcCU, |
---|
274 | UInt uiTrDepth, |
---|
275 | UInt uiAbsPartIdx, |
---|
276 | TComYuv* pcOrgYuv, |
---|
277 | TComYuv* pcPredYuv, |
---|
278 | TComYuv* pcResiYuv, |
---|
279 | UInt& ruiDist, |
---|
280 | UInt uiChromaId, |
---|
281 | Int default0Save1Load2 = 0 ); |
---|
282 | |
---|
283 | Void xRecurIntraCodingQT ( TComDataCU* pcCU, |
---|
284 | UInt uiTrDepth, |
---|
285 | UInt uiAbsPartIdx, |
---|
286 | Bool bLumaOnly, |
---|
287 | TComYuv* pcOrgYuv, |
---|
288 | TComYuv* pcPredYuv, |
---|
289 | TComYuv* pcResiYuv, |
---|
290 | UInt& ruiDistY, |
---|
291 | UInt& ruiDistC, |
---|
292 | #if HHI_RQT_INTRA_SPEEDUP |
---|
293 | Bool bCheckFirst, |
---|
294 | #endif |
---|
295 | Double& dRDCost ); |
---|
296 | |
---|
297 | Void xSetIntraResultQT ( TComDataCU* pcCU, |
---|
298 | UInt uiTrDepth, |
---|
299 | UInt uiAbsPartIdx, |
---|
300 | Bool bLumaOnly, |
---|
301 | TComYuv* pcRecoYuv ); |
---|
302 | |
---|
303 | Void xRecurIntraChromaCodingQT ( TComDataCU* pcCU, |
---|
304 | UInt uiTrDepth, |
---|
305 | UInt uiAbsPartIdx, |
---|
306 | TComYuv* pcOrgYuv, |
---|
307 | TComYuv* pcPredYuv, |
---|
308 | TComYuv* pcResiYuv, |
---|
309 | UInt& ruiDist ); |
---|
310 | Void xSetIntraResultChromaQT ( TComDataCU* pcCU, |
---|
311 | UInt uiTrDepth, |
---|
312 | UInt uiAbsPartIdx, |
---|
313 | TComYuv* pcRecoYuv ); |
---|
314 | |
---|
315 | Void xStoreIntraResultQT ( TComDataCU* pcCU, |
---|
316 | UInt uiTrDepth, |
---|
317 | UInt uiAbsPartIdx, |
---|
318 | Bool bLumaOnly ); |
---|
319 | Void xLoadIntraResultQT ( TComDataCU* pcCU, |
---|
320 | UInt uiTrDepth, |
---|
321 | UInt uiAbsPartIdx, |
---|
322 | Bool bLumaOnly ); |
---|
323 | Void xStoreIntraResultChromaQT ( TComDataCU* pcCU, |
---|
324 | UInt uiTrDepth, |
---|
325 | UInt uiAbsPartIdx, |
---|
326 | UInt stateU0V1Both2 ); |
---|
327 | Void xLoadIntraResultChromaQT ( TComDataCU* pcCU, |
---|
328 | UInt uiTrDepth, |
---|
329 | UInt uiAbsPartIdx, |
---|
330 | UInt stateU0V1Both2 ); |
---|
331 | |
---|
332 | // ------------------------------------------------------------------------------------------------------------------- |
---|
333 | // Inter search (AMP) |
---|
334 | // ------------------------------------------------------------------------------------------------------------------- |
---|
335 | |
---|
336 | Void xEstimateMvPredAMVP ( TComDataCU* pcCU, |
---|
337 | TComYuv* pcOrgYuv, |
---|
338 | UInt uiPartIdx, |
---|
339 | RefPicList eRefPicList, |
---|
340 | Int iRefIdx, |
---|
341 | TComMv& rcMvPred, |
---|
342 | Bool bFilled = false |
---|
343 | , UInt* puiDistBiP = NULL |
---|
344 | #if ZERO_MVD_EST |
---|
345 | , UInt* puiDist = NULL |
---|
346 | #endif |
---|
347 | ); |
---|
348 | |
---|
349 | Void xCheckBestMVP ( TComDataCU* pcCU, |
---|
350 | RefPicList eRefPicList, |
---|
351 | TComMv cMv, |
---|
352 | TComMv& rcMvPred, |
---|
353 | Int& riMVPIdx, |
---|
354 | UInt& ruiBits, |
---|
355 | UInt& ruiCost ); |
---|
356 | |
---|
357 | UInt xGetTemplateCost ( TComDataCU* pcCU, |
---|
358 | UInt uiPartIdx, |
---|
359 | UInt uiPartAddr, |
---|
360 | TComYuv* pcOrgYuv, |
---|
361 | TComYuv* pcTemplateCand, |
---|
362 | TComMv cMvCand, |
---|
363 | Int iMVPIdx, |
---|
364 | Int iMVPNum, |
---|
365 | RefPicList eRefPicList, |
---|
366 | Int iRefIdx, |
---|
367 | Int iSizeX, |
---|
368 | Int iSizeY |
---|
369 | #if ZERO_MVD_EST |
---|
370 | , UInt& ruiDist |
---|
371 | #endif |
---|
372 | ); |
---|
373 | |
---|
374 | |
---|
375 | Void xCopyAMVPInfo ( AMVPInfo* pSrc, AMVPInfo* pDst ); |
---|
376 | UInt xGetMvpIdxBits ( Int iIdx, Int iNum ); |
---|
377 | Void xGetBlkBits ( PartSize eCUMode, Bool bPSlice, Int iPartIdx, UInt uiLastMode, UInt uiBlkBit[3]); |
---|
378 | |
---|
379 | Void xMergeEstimation ( TComDataCU* pcCU, |
---|
380 | TComYuv* pcYuvOrg, |
---|
381 | Int iPartIdx, |
---|
382 | UInt& uiInterDir, |
---|
383 | TComMvField* pacMvField, |
---|
384 | UInt& uiMergeIndex, |
---|
385 | UInt& ruiCost |
---|
386 | , TComMvField* cMvFieldNeighbours, |
---|
387 | UChar* uhInterDirNeighbours, |
---|
388 | Int& numValidMergeCand |
---|
389 | ); |
---|
390 | |
---|
391 | Void xRestrictBipredMergeCand ( TComDataCU* pcCU, |
---|
392 | UInt puIdx, |
---|
393 | TComMvField* mvFieldNeighbours, |
---|
394 | UChar* interDirNeighbours, |
---|
395 | Int numValidMergeCand ); |
---|
396 | |
---|
397 | // ------------------------------------------------------------------------------------------------------------------- |
---|
398 | // motion estimation |
---|
399 | // ------------------------------------------------------------------------------------------------------------------- |
---|
400 | |
---|
401 | Void xMotionEstimation ( TComDataCU* pcCU, |
---|
402 | TComYuv* pcYuvOrg, |
---|
403 | Int iPartIdx, |
---|
404 | RefPicList eRefPicList, |
---|
405 | TComMv* pcMvPred, |
---|
406 | Int iRefIdxPred, |
---|
407 | TComMv& rcMv, |
---|
408 | UInt& ruiBits, |
---|
409 | UInt& ruiCost, |
---|
410 | Bool bBi = false ); |
---|
411 | |
---|
412 | Void xTZSearch ( TComDataCU* pcCU, |
---|
413 | TComPattern* pcPatternKey, |
---|
414 | Pel* piRefY, |
---|
415 | Int iRefStride, |
---|
416 | TComMv* pcMvSrchRngLT, |
---|
417 | TComMv* pcMvSrchRngRB, |
---|
418 | TComMv& rcMv, |
---|
419 | UInt& ruiSAD ); |
---|
420 | |
---|
421 | Void xSetSearchRange ( TComDataCU* pcCU, |
---|
422 | TComMv& cMvPred, |
---|
423 | Int iSrchRng, |
---|
424 | TComMv& rcMvSrchRngLT, |
---|
425 | TComMv& rcMvSrchRngRB ); |
---|
426 | |
---|
427 | Void xPatternSearchFast ( TComDataCU* pcCU, |
---|
428 | TComPattern* pcPatternKey, |
---|
429 | Pel* piRefY, |
---|
430 | Int iRefStride, |
---|
431 | TComMv* pcMvSrchRngLT, |
---|
432 | TComMv* pcMvSrchRngRB, |
---|
433 | TComMv& rcMv, |
---|
434 | UInt& ruiSAD ); |
---|
435 | |
---|
436 | Void xPatternSearch ( TComPattern* pcPatternKey, |
---|
437 | Pel* piRefY, |
---|
438 | Int iRefStride, |
---|
439 | TComMv* pcMvSrchRngLT, |
---|
440 | TComMv* pcMvSrchRngRB, |
---|
441 | TComMv& rcMv, |
---|
442 | UInt& ruiSAD ); |
---|
443 | |
---|
444 | Void xPatternSearchFracDIF ( TComDataCU* pcCU, |
---|
445 | TComPattern* pcPatternKey, |
---|
446 | Pel* piRefY, |
---|
447 | Int iRefStride, |
---|
448 | TComMv* pcMvInt, |
---|
449 | TComMv& rcMvHalf, |
---|
450 | TComMv& rcMvQter, |
---|
451 | UInt& ruiCost |
---|
452 | ,Bool biPred |
---|
453 | ); |
---|
454 | #if REF_IDX_ME_ZEROMV |
---|
455 | Void xPatternSearchFracDIFMv0 ( TComDataCU* pcCU, |
---|
456 | TComPattern* pcPatternKey, |
---|
457 | Pel* piRefY, |
---|
458 | Int iRefStride, |
---|
459 | TComMv* pcMvInt, |
---|
460 | TComMv& rcMvHalf, |
---|
461 | TComMv& rcMvQter, |
---|
462 | UInt& ruiCost, |
---|
463 | Bool biPred ); |
---|
464 | #endif |
---|
465 | Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred ); |
---|
466 | Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred ); |
---|
467 | |
---|
468 | // ------------------------------------------------------------------------------------------------------------------- |
---|
469 | // T & Q & Q-1 & T-1 |
---|
470 | // ------------------------------------------------------------------------------------------------------------------- |
---|
471 | |
---|
472 | Void xEncodeResidualQT( TComDataCU* pcCU, UInt uiAbsPartIdx, const UInt uiDepth, Bool bSubdivAndCbf, TextType eType ); |
---|
473 | Void xEstimateResidualQT( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx, UInt absTUPartIdx,TComYuv* pcResi, const UInt uiDepth, Double &rdCost, UInt &ruiBits, UInt &ruiDist, UInt *puiZeroDist ); |
---|
474 | Void xSetResidualQTData( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx,UInt absTUPartIdx, TComYuv* pcResi, UInt uiDepth, Bool bSpatial ); |
---|
475 | |
---|
476 | UInt xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPU, UInt uiPartOffset, UInt uiDepth, UInt uiInitTrDepth ); |
---|
477 | UInt xUpdateCandList( UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double * CandCostList ); |
---|
478 | |
---|
479 | // ------------------------------------------------------------------------------------------------------------------- |
---|
480 | // compute symbol bits |
---|
481 | // ------------------------------------------------------------------------------------------------------------------- |
---|
482 | |
---|
483 | Void xAddSymbolBitsInter ( TComDataCU* pcCU, |
---|
484 | UInt uiQp, |
---|
485 | UInt uiTrMode, |
---|
486 | UInt& ruiBits, |
---|
487 | TComYuv*& rpcYuvRec, |
---|
488 | TComYuv* pcYuvPred, |
---|
489 | TComYuv*& rpcYuvResi ); |
---|
490 | |
---|
491 | Void setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx, RefPicList eRefPicListCur ); |
---|
492 | inline Void setDistParamComp( UInt uiComp ) { m_cDistParam.uiComp = uiComp; } |
---|
493 | |
---|
494 | };// END CLASS DEFINITION TEncSearch |
---|
495 | |
---|
496 | //! \} |
---|
497 | |
---|
498 | #endif // __TENCSEARCH__ |
---|