1 | |
---|
2 | |
---|
3 | /** \file TEncSearch.h |
---|
4 | \brief encoder search class (header) |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __TENCSEARCH__ |
---|
8 | #define __TENCSEARCH__ |
---|
9 | |
---|
10 | // Include files |
---|
11 | #include "../TLibCommon/TComYuv.h" |
---|
12 | #include "../TLibCommon/TComMotionInfo.h" |
---|
13 | #include "../TLibCommon/TComPattern.h" |
---|
14 | #include "../TLibCommon/TComPredFilter.h" |
---|
15 | #include "../TLibCommon/TComPrediction.h" |
---|
16 | #include "../TLibCommon/TComTrQuant.h" |
---|
17 | #include "../TLibCommon/TComPic.h" |
---|
18 | #include "../TLibCommon/TComWedgelet.h" |
---|
19 | #include "TEncEntropy.h" |
---|
20 | #include "TEncSbac.h" |
---|
21 | #include "TEncCfg.h" |
---|
22 | |
---|
23 | class TEncCu; |
---|
24 | |
---|
25 | // ==================================================================================================================== |
---|
26 | // Class definition |
---|
27 | // ==================================================================================================================== |
---|
28 | |
---|
29 | /// encoder search class |
---|
30 | class TEncSearch : public TComPrediction |
---|
31 | { |
---|
32 | private: |
---|
33 | TCoeff** m_ppcQTTempCoeffY; |
---|
34 | TCoeff** m_ppcQTTempCoeffCb; |
---|
35 | TCoeff** m_ppcQTTempCoeffCr; |
---|
36 | TCoeff* m_pcQTTempCoeffY; |
---|
37 | TCoeff* m_pcQTTempCoeffCb; |
---|
38 | TCoeff* m_pcQTTempCoeffCr; |
---|
39 | UChar* m_puhQTTempTrIdx; |
---|
40 | UChar* m_puhQTTempCbf[3]; |
---|
41 | |
---|
42 | TComYuv* m_pcQTTempTComYuv; |
---|
43 | protected: |
---|
44 | // interface to option |
---|
45 | TEncCfg* m_pcEncCfg; |
---|
46 | |
---|
47 | // interface to classes |
---|
48 | TComTrQuant* m_pcTrQuant; |
---|
49 | TComRdCost* m_pcRdCost; |
---|
50 | TEncEntropy* m_pcEntropyCoder; |
---|
51 | |
---|
52 | // ME parameters |
---|
53 | Int m_iSearchRange; |
---|
54 | Int m_bipredSearchRange; // Search range for bi-prediction |
---|
55 | Int m_iFastSearch; |
---|
56 | Int m_aaiAdaptSR[2][33]; |
---|
57 | TComMv m_cSrchRngLT; |
---|
58 | TComMv m_cSrchRngRB; |
---|
59 | TComMv m_acMvPredictors[3]; |
---|
60 | |
---|
61 | // RD computation |
---|
62 | TEncSbac*** m_pppcRDSbacCoder; |
---|
63 | TEncSbac* m_pcRDGoOnSbacCoder; |
---|
64 | Bool m_bUseSBACRD; |
---|
65 | DistParam m_cDistParam; |
---|
66 | |
---|
67 | // Misc. |
---|
68 | Pel* m_pTempPel; |
---|
69 | UInt* m_puiDFilter; |
---|
70 | Int m_iMaxDeltaQP; |
---|
71 | |
---|
72 | |
---|
73 | //GT VSO |
---|
74 | TComYuv m_cYuvRecTemp; |
---|
75 | //GT VSO end |
---|
76 | |
---|
77 | // AMVP cost computation |
---|
78 | // UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS]; |
---|
79 | UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS+1]; //th array bounds |
---|
80 | |
---|
81 | public: |
---|
82 | TEncSearch(); |
---|
83 | virtual ~TEncSearch(); |
---|
84 | |
---|
85 | Void init( TEncCfg* pcEncCfg, |
---|
86 | TComTrQuant* pcTrQuant, |
---|
87 | Int iSearchRange, |
---|
88 | Int bipredSearchRange, |
---|
89 | Int iFastSearch, |
---|
90 | Int iMaxDeltaQP, |
---|
91 | TEncEntropy* pcEntropyCoder, |
---|
92 | TComRdCost* pcRdCost, |
---|
93 | TEncSbac*** pppcRDSbacCoder, |
---|
94 | TEncSbac* pcRDGoOnSbacCoder ); |
---|
95 | |
---|
96 | protected: |
---|
97 | |
---|
98 | /// sub-function for motion vector refinement used in fractional-pel accuracy |
---|
99 | #ifdef ROUNDING_CONTROL_BIPRED |
---|
100 | UInt xPatternRefinement_Bi( TComPattern* pcPatternKey, Pel* piRef, Int iRefStride, Int iIntStep, Int iFrac, TComMv& rcMvFrac, Pel* pRefY2, Bool bRound ); |
---|
101 | #endif |
---|
102 | |
---|
103 | UInt xPatternRefinement( TComPattern* pcPatternKey, Pel* piRef, Int iRefStride, Int iIntStep, Int iFrac, TComMv& rcMvFrac ); |
---|
104 | |
---|
105 | #if (!REFERENCE_SAMPLE_PADDING) |
---|
106 | #if HHI_DMM_INTRA |
---|
107 | Bool predIntraLumaDirAvailable( UInt uiMode, UInt uiWidthBit, Bool bAboveAvail, Bool bLeftAvail, UInt uiWidth, UInt uiHeight, TComDataCU* pcCU, UInt uiAbsPartIdx ); |
---|
108 | #else |
---|
109 | Bool predIntraLumaDirAvailable( UInt uiMode, UInt uiWidthBit, Bool bAboveAvail, Bool bLeftAvail); |
---|
110 | #endif |
---|
111 | #endif |
---|
112 | |
---|
113 | #if HHI_DMM_INTRA |
---|
114 | Void xSearchWedgeFullMinDist ( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx ); |
---|
115 | Void xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ); |
---|
116 | |
---|
117 | Void xGetWedgeDeltaDCsMinDist ( TComWedgelet* pcWedgelet, |
---|
118 | TComDataCU* pcCU, |
---|
119 | UInt uiAbsPtIdx, |
---|
120 | Pel* piOrig, |
---|
121 | Pel* piPredic, |
---|
122 | UInt uiStride, |
---|
123 | UInt uiWidth, |
---|
124 | UInt uiHeight, |
---|
125 | Int& riDeltaDC1, |
---|
126 | Int& riDeltaDC2, |
---|
127 | Bool bAbove, |
---|
128 | Bool bLeft ); |
---|
129 | |
---|
130 | Void xDeltaDCQuantScaleDown( TComDataCU* pcCU, Int& riDeltaDC ); |
---|
131 | #endif |
---|
132 | |
---|
133 | |
---|
134 | typedef struct |
---|
135 | { |
---|
136 | Pel* piRefY; |
---|
137 | Int iYStride; |
---|
138 | Int iBestX; |
---|
139 | Int iBestY; |
---|
140 | UInt uiBestRound; |
---|
141 | UInt uiBestDistance; |
---|
142 | UInt uiBestSad; |
---|
143 | UChar ucPointNr; |
---|
144 | } IntTZSearchStruct; |
---|
145 | |
---|
146 | // sub-functions for ME |
---|
147 | __inline Void xTZSearchHelp ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance ); |
---|
148 | __inline Void xTZ2PointSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB ); |
---|
149 | __inline Void xTZ8PointSquareSearch ( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist ); |
---|
150 | __inline Void xTZ8PointDiamondSearch( TComPattern* pcPatternKey, IntTZSearchStruct& rcStrukt, TComMv* pcMvSrchRngLT, TComMv* pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist ); |
---|
151 | |
---|
152 | Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiSAD, Bool Hadamard ); |
---|
153 | |
---|
154 | public: |
---|
155 | Void preestChromaPredMode ( TComDataCU* pcCU, |
---|
156 | TComYuv* pcOrgYuv, |
---|
157 | TComYuv* pcPredYuv ); |
---|
158 | Void estIntraPredQT ( TComDataCU* pcCU, |
---|
159 | TComYuv* pcOrgYuv, |
---|
160 | TComYuv* pcPredYuv, |
---|
161 | TComYuv* pcResiYuv, |
---|
162 | TComYuv* pcRecoYuv, |
---|
163 | Dist& ruiDistC, |
---|
164 | Bool bLumaOnly ); |
---|
165 | Void estIntraPredChromaQT ( TComDataCU* pcCU, |
---|
166 | TComYuv* pcOrgYuv, |
---|
167 | TComYuv* pcPredYuv, |
---|
168 | TComYuv* pcResiYuv, |
---|
169 | TComYuv* pcRecoYuv, |
---|
170 | Dist uiPreCalcDistC ); |
---|
171 | |
---|
172 | #if HHI_DMM_INTRA |
---|
173 | Bool predIntraLumaDMMAvailable( UInt uiMode, |
---|
174 | Bool bAboveAvail, |
---|
175 | Bool bLeftAvail, |
---|
176 | UInt uiWidth, |
---|
177 | UInt uiHeight, |
---|
178 | TComDataCU* pcCU, |
---|
179 | UInt uiAbsPartIdx ); |
---|
180 | Void findWedgeFullMinDist ( TComDataCU* pcCU, |
---|
181 | UInt uiAbsPtIdx, |
---|
182 | Pel* piOrig, |
---|
183 | Pel* piPredic, |
---|
184 | UInt uiStride, |
---|
185 | UInt uiWidth, |
---|
186 | UInt uiHeight, |
---|
187 | UInt& ruiTabIdx, |
---|
188 | Int& riDeltaDC1, |
---|
189 | Int& riDeltaDC2, |
---|
190 | Bool bAbove, |
---|
191 | Bool bLeft, |
---|
192 | WedgeDist eWedgeDist ); |
---|
193 | Void findWedgePredDirMinDist ( TComDataCU* pcCU, |
---|
194 | UInt uiAbsPtIdx, |
---|
195 | Pel* piOrig, |
---|
196 | Pel* piPredic, |
---|
197 | UInt uiStride, |
---|
198 | UInt uiWidth, |
---|
199 | UInt uiHeight, |
---|
200 | UInt& ruiTabIdx, |
---|
201 | Int& riWedgeDeltaEnd, |
---|
202 | Int& riDeltaDC1, |
---|
203 | Int& riDeltaDC2, |
---|
204 | Bool bAbove, |
---|
205 | Bool bLeft, |
---|
206 | WedgeDist eWedgeDist ); |
---|
207 | Void findWedgeTexMinDist ( TComDataCU* pcCU, |
---|
208 | UInt uiAbsPtIdx, |
---|
209 | Pel* piOrig, |
---|
210 | Pel* piPredic, |
---|
211 | UInt uiStride, |
---|
212 | UInt uiWidth, |
---|
213 | UInt uiHeight, |
---|
214 | UInt& ruiTabIdx, |
---|
215 | Int& riDeltaDC1, |
---|
216 | Int& riDeltaDC2, |
---|
217 | Bool bAbove, |
---|
218 | Bool bLeft, |
---|
219 | WedgeDist eWedgeDist ); |
---|
220 | Void findContourPredTex ( TComDataCU* pcCU, |
---|
221 | UInt uiAbsPtIdx, |
---|
222 | Pel* piOrig, |
---|
223 | Pel* piPredic, |
---|
224 | UInt uiStride, |
---|
225 | UInt uiWidth, |
---|
226 | UInt uiHeight, |
---|
227 | Int& riDeltaDC1, |
---|
228 | Int& riDeltaDC2, |
---|
229 | Bool bAbove, |
---|
230 | Bool bLeft ); |
---|
231 | |
---|
232 | #endif |
---|
233 | |
---|
234 | /// encoder estimation - inter prediction (non-skip) |
---|
235 | Void predInterSearch ( TComDataCU* pcCU, |
---|
236 | TComYuv* pcOrgYuv, |
---|
237 | TComYuv*& rpcPredYuv, |
---|
238 | TComYuv*& rpcResiYuv, |
---|
239 | TComYuv*& rpcRecoYuv, |
---|
240 | Bool bUseRes = false ); |
---|
241 | |
---|
242 | /// encoder estimation - intra prediction (skip) |
---|
243 | Void predInterSkipSearch ( TComDataCU* pcCU, |
---|
244 | TComYuv* pcOrgYuv, |
---|
245 | TComYuv*& rpcPredYuv, |
---|
246 | TComYuv*& rpcResiYuv, |
---|
247 | TComYuv*& rpcRecoYuv ); |
---|
248 | |
---|
249 | /// encode residual and compute rd-cost for inter mode |
---|
250 | Void encodeResAndCalcRdInterCU( TComDataCU* pcCU, |
---|
251 | TComYuv* pcYuvOrg, |
---|
252 | TComYuv* pcYuvPred, |
---|
253 | TComYuv*& rpcYuvResi, |
---|
254 | TComYuv*& rpcYuvResiBest, |
---|
255 | TComYuv*& rpcYuvRec, |
---|
256 | TComYuv*& rpcYuvResPrd, |
---|
257 | Bool bSkipRes ); |
---|
258 | |
---|
259 | /// set ME search range |
---|
260 | Void setAdaptiveSearchRange ( Int iDir, Int iRefIdx, Int iSearchRange) { m_aaiAdaptSR[iDir][iRefIdx] = iSearchRange; } |
---|
261 | |
---|
262 | protected: |
---|
263 | |
---|
264 | // ------------------------------------------------------------------------------------------------------------------- |
---|
265 | // Intra search |
---|
266 | // ------------------------------------------------------------------------------------------------------------------- |
---|
267 | |
---|
268 | Void xEncSubdivCbfQT ( TComDataCU* pcCU, |
---|
269 | UInt uiTrDepth, |
---|
270 | UInt uiAbsPartIdx, |
---|
271 | Bool bLuma, |
---|
272 | Bool bChroma ); |
---|
273 | Void xEncCoeffQT ( TComDataCU* pcCU, |
---|
274 | UInt uiTrDepth, |
---|
275 | UInt uiAbsPartIdx, |
---|
276 | TextType eTextType, |
---|
277 | Bool bRealCoeff ); |
---|
278 | Void xEncIntraHeader ( TComDataCU* pcCU, |
---|
279 | UInt uiTrDepth, |
---|
280 | UInt uiAbsPartIdx, |
---|
281 | Bool bLuma, |
---|
282 | Bool bChroma ); |
---|
283 | UInt xGetIntraBitsQT ( TComDataCU* pcCU, |
---|
284 | UInt uiTrDepth, |
---|
285 | UInt uiAbsPartIdx, |
---|
286 | Bool bLuma, |
---|
287 | Bool bChroma, |
---|
288 | Bool bRealCoeff ); |
---|
289 | |
---|
290 | Void xIntraCodingLumaBlk ( TComDataCU* pcCU, |
---|
291 | UInt uiTrDepth, |
---|
292 | UInt uiAbsPartIdx, |
---|
293 | TComYuv* pcOrgYuv, |
---|
294 | TComYuv* pcPredYuv, |
---|
295 | TComYuv* pcResiYuv, |
---|
296 | Dist& ruiDist |
---|
297 | #if DMM_RES_CHECK_INTRA |
---|
298 | , |
---|
299 | Bool bCheckNoRes = false |
---|
300 | #endif |
---|
301 | ); |
---|
302 | |
---|
303 | #if DMM_RES_CHECK_INTRA |
---|
304 | Void xSetIntraNoResi ( TComDataCU* pcCU, |
---|
305 | UInt uiTrDepth, |
---|
306 | UInt uiAbsPartIdx, |
---|
307 | TComYuv* pcPredYuv, |
---|
308 | TComYuv* pcResiYuv, |
---|
309 | Bool bNoRes |
---|
310 | ); |
---|
311 | #endif |
---|
312 | |
---|
313 | Void xIntraCodingChromaBlk ( TComDataCU* pcCU, |
---|
314 | UInt uiTrDepth, |
---|
315 | UInt uiAbsPartIdx, |
---|
316 | TComYuv* pcOrgYuv, |
---|
317 | TComYuv* pcPredYuv, |
---|
318 | TComYuv* pcResiYuv, |
---|
319 | Dist& ruiDist, |
---|
320 | UInt uiChromaId ); |
---|
321 | Void xRecurIntraCodingQT ( TComDataCU* pcCU, |
---|
322 | UInt uiTrDepth, |
---|
323 | UInt uiAbsPartIdx, |
---|
324 | Bool bLumaOnly, |
---|
325 | TComYuv* pcOrgYuv, |
---|
326 | TComYuv* pcPredYuv, |
---|
327 | TComYuv* pcResiYuv, |
---|
328 | Dist& ruiDistY, |
---|
329 | Dist& ruiDistC, |
---|
330 | #if HHI_RQT_INTRA_SPEEDUP |
---|
331 | Bool bCheckFirst, |
---|
332 | #endif |
---|
333 | Double& dRDCost ); |
---|
334 | |
---|
335 | Void xSetIntraResultQT ( TComDataCU* pcCU, |
---|
336 | UInt uiTrDepth, |
---|
337 | UInt uiAbsPartIdx, |
---|
338 | Bool bLumaOnly, |
---|
339 | TComYuv* pcRecoYuv ); |
---|
340 | |
---|
341 | Void xRecurIntraChromaCodingQT ( TComDataCU* pcCU, |
---|
342 | UInt uiTrDepth, |
---|
343 | UInt uiAbsPartIdx, |
---|
344 | TComYuv* pcOrgYuv, |
---|
345 | TComYuv* pcPredYuv, |
---|
346 | TComYuv* pcResiYuv, |
---|
347 | Dist& ruiDist ); |
---|
348 | Void xSetIntraResultChromaQT ( TComDataCU* pcCU, |
---|
349 | UInt uiTrDepth, |
---|
350 | UInt uiAbsPartIdx, |
---|
351 | TComYuv* pcRecoYuv ); |
---|
352 | |
---|
353 | // ------------------------------------------------------------------------------------------------------------------- |
---|
354 | // Inter search (AMP) |
---|
355 | // ------------------------------------------------------------------------------------------------------------------- |
---|
356 | |
---|
357 | Void xEstimateMvPredAMVP ( TComDataCU* pcCU, |
---|
358 | TComYuv* pcOrgYuv, |
---|
359 | UInt uiPartIdx, |
---|
360 | RefPicList eRefPicList, |
---|
361 | Int iRefIdx, |
---|
362 | TComMv& rcMvPred, |
---|
363 | Bool bFilled = false |
---|
364 | #if ZERO_MVD_EST |
---|
365 | , UInt* puiDist = NULL |
---|
366 | #endif |
---|
367 | ); |
---|
368 | |
---|
369 | Void xCheckBestMVP ( TComDataCU* pcCU, |
---|
370 | RefPicList eRefPicList, |
---|
371 | TComMv cMv, |
---|
372 | TComMv& rcMvPred, |
---|
373 | Int& riMVPIdx, |
---|
374 | UInt& ruiBits, |
---|
375 | UInt& ruiCost ); |
---|
376 | |
---|
377 | UInt xGetTemplateCost ( TComDataCU* pcCU, |
---|
378 | UInt uiPartIdx, |
---|
379 | UInt uiPartAddr, |
---|
380 | TComYuv* pcOrgYuv, |
---|
381 | TComYuv* pcTemplateCand, |
---|
382 | TComMv cMvCand, |
---|
383 | Int iMVPIdx, |
---|
384 | Int iMVPNum, |
---|
385 | RefPicList eRefPicList, |
---|
386 | Int iRefIdx, |
---|
387 | Int iSizeX, |
---|
388 | Int iSizeY |
---|
389 | #if ZERO_MVD_EST |
---|
390 | , UInt& ruiDist |
---|
391 | #endif |
---|
392 | ); |
---|
393 | |
---|
394 | |
---|
395 | Void xCopyAMVPInfo ( AMVPInfo* pSrc, AMVPInfo* pDst ); |
---|
396 | UInt xGetMvpIdxBits ( Int iIdx, Int iNum ); |
---|
397 | Void xGetBlkBits ( PartSize eCUMode, Bool bPSlice, Int iPartIdx, UInt uiLastMode, UInt uiBlkBit[3]); |
---|
398 | |
---|
399 | Void xMergeEstimation ( TComDataCU* pcCU, |
---|
400 | TComYuv* pcYuvOrg, |
---|
401 | Int iPartIdx, |
---|
402 | UInt& uiInterDir, |
---|
403 | TComMvField* pacMvField, |
---|
404 | UInt& uiMergeIndex, |
---|
405 | UInt& ruiCost, |
---|
406 | UInt& ruiBits, |
---|
407 | UChar* puhNeighCands, |
---|
408 | Bool& bValid ); |
---|
409 | // ------------------------------------------------------------------------------------------------------------------- |
---|
410 | // motion estimation |
---|
411 | // ------------------------------------------------------------------------------------------------------------------- |
---|
412 | |
---|
413 | Void xMotionEstimation ( TComDataCU* pcCU, |
---|
414 | TComYuv* pcYuvOrg, |
---|
415 | Int iPartIdx, |
---|
416 | RefPicList eRefPicList, |
---|
417 | TComMv* pcMvPred, |
---|
418 | Int iRefIdxPred, |
---|
419 | TComMv& rcMv, |
---|
420 | UInt& ruiBits, |
---|
421 | UInt& ruiCost, |
---|
422 | Bool bBi = false ); |
---|
423 | |
---|
424 | Void xTZSearch ( TComDataCU* pcCU, |
---|
425 | TComPattern* pcPatternKey, |
---|
426 | Pel* piRefY, |
---|
427 | Int iRefStride, |
---|
428 | TComMv* pcMvSrchRngLT, |
---|
429 | TComMv* pcMvSrchRngRB, |
---|
430 | TComMv& rcMv, |
---|
431 | UInt& ruiSAD ); |
---|
432 | |
---|
433 | Void xSetSearchRange ( TComDataCU* pcCU, |
---|
434 | TComMv& cMvPred, |
---|
435 | Int iSrchRng, |
---|
436 | TComMv& rcMvSrchRngLT, |
---|
437 | TComMv& rcMvSrchRngRB ); |
---|
438 | |
---|
439 | Void xPatternSearchFast ( TComDataCU* pcCU, |
---|
440 | TComPattern* pcPatternKey, |
---|
441 | Pel* piRefY, |
---|
442 | Int iRefStride, |
---|
443 | TComMv* pcMvSrchRngLT, |
---|
444 | TComMv* pcMvSrchRngRB, |
---|
445 | TComMv& rcMv, |
---|
446 | UInt& ruiSAD ); |
---|
447 | |
---|
448 | #ifdef ROUNDING_CONTROL_BIPRED |
---|
449 | Void xPatternSearch_Bi ( TComPattern* pcPatternKey, |
---|
450 | Pel* piRefY, |
---|
451 | Int iRefStride, |
---|
452 | TComMv* pcMvSrchRngLT, |
---|
453 | TComMv* pcMvSrchRngRB, |
---|
454 | TComMv& rcMv, |
---|
455 | UInt& ruiSAD, |
---|
456 | Pel* pcRefY2, |
---|
457 | Bool bRound); |
---|
458 | |
---|
459 | Void xPatternSearchFracDIF_Bi ( TComDataCU* pcCU, |
---|
460 | TComPattern* pcPatternKey, |
---|
461 | Pel* piRefY, |
---|
462 | Int iRefStride, |
---|
463 | TComMv* pcMvInt, |
---|
464 | TComMv& rcMvHalf, |
---|
465 | TComMv& rcMvQter, |
---|
466 | UInt& ruiCost, |
---|
467 | Pel* pcRefY2, |
---|
468 | Bool bRound); |
---|
469 | #endif |
---|
470 | |
---|
471 | Void xPatternSearch ( TComPattern* pcPatternKey, |
---|
472 | Pel* piRefY, |
---|
473 | Int iRefStride, |
---|
474 | TComMv* pcMvSrchRngLT, |
---|
475 | TComMv* pcMvSrchRngRB, |
---|
476 | TComMv& rcMv, |
---|
477 | UInt& ruiSAD ); |
---|
478 | |
---|
479 | Void xPatternSearchFracDIF ( TComDataCU* pcCU, |
---|
480 | TComPattern* pcPatternKey, |
---|
481 | Pel* piRefY, |
---|
482 | Int iRefStride, |
---|
483 | TComMv* pcMvInt, |
---|
484 | TComMv& rcMvHalf, |
---|
485 | TComMv& rcMvQter, |
---|
486 | UInt& ruiCost |
---|
487 | ); |
---|
488 | |
---|
489 | Void xExtDIFUpSamplingH ( TComPattern* pcPattern, TComYuv* pcYuvExt ); |
---|
490 | |
---|
491 | Void xExtDIFUpSamplingQ ( TComPattern* pcPatternKey, |
---|
492 | Pel* piDst, |
---|
493 | Int iDstStride, |
---|
494 | Pel* piSrcPel, |
---|
495 | Int iSrcPelStride, |
---|
496 | Int* piSrc, |
---|
497 | Int iSrcStride, |
---|
498 | UInt uiFilter ); |
---|
499 | |
---|
500 | |
---|
501 | // ------------------------------------------------------------------------------------------------------------------- |
---|
502 | // T & Q & Q-1 & T-1 |
---|
503 | // ------------------------------------------------------------------------------------------------------------------- |
---|
504 | |
---|
505 | Void xEncodeResidualQT( TComDataCU* pcCU, UInt uiAbsPartIdx, const UInt uiDepth, Bool bSubdivAndCbf, TextType eType ); |
---|
506 | Void xEstimateResidualQT( TComDataCU* pcCU, UInt uiQuadrant, UInt uiAbsPartIdx, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, const UInt uiDepth, Double &rdCost, UInt &ruiBits, Dist &ruiDist, Dist *puiZeroDist ); |
---|
507 | Void xSetResidualQTData( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcResi, UInt uiDepth, Bool bSpatial ); |
---|
508 | |
---|
509 | UInt xModeBitsIntra ( TComDataCU* pcCU, UInt uiMode, UInt uiPU, UInt uiPartOffset, UInt uiDepth, UInt uiInitTrDepth ); |
---|
510 | UInt xUpdateCandList( UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double * CandCostList ); |
---|
511 | |
---|
512 | // ------------------------------------------------------------------------------------------------------------------- |
---|
513 | // compute symbol bits |
---|
514 | // ------------------------------------------------------------------------------------------------------------------- |
---|
515 | |
---|
516 | Void xAddSymbolBitsInter ( TComDataCU* pcCU, |
---|
517 | UInt uiQp, |
---|
518 | UInt uiTrMode, |
---|
519 | UInt& ruiBits, |
---|
520 | TComYuv*& rpcYuvRec, |
---|
521 | TComYuv* pcYuvPred, |
---|
522 | TComYuv*& rpcYuvResi ); |
---|
523 | |
---|
524 | #ifdef WEIGHT_PRED |
---|
525 | Void setWpScalingDistParam( TComDataCU* pcCU, Int iRefIdx0, Int iRefIdx1 , RefPicList eRefPicList ); |
---|
526 | inline Void setDistParamComp( UInt uiComp ) { m_cDistParam.uiComp = uiComp; } |
---|
527 | #endif |
---|
528 | };// END CLASS DEFINITION TEncSearch |
---|
529 | |
---|
530 | |
---|
531 | #endif // __TENCSEARCH__ |
---|
532 | |
---|