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