101 Int iSizeInTComMv =
sizeof(
TComMv ) * iNumPartSrc;
103 memcpy(
m_pcMv + iPartAddrDst, pcCUMvFieldSrc->
m_pcMv, iSizeInTComMv );
104 memcpy(
m_pcMvd + iPartAddrDst, pcCUMvFieldSrc->
m_pcMvd, iSizeInTComMv );
115 Int iSizeInTComMv =
sizeof(
TComMv ) * uiNumPart;
116 Int iOffset = uiOffset + iPartAddrDst;
118 memcpy( pcCUMvFieldDst->
m_pcMv + iOffset,
m_pcMv + uiOffset, iSizeInTComMv );
119 memcpy( pcCUMvFieldDst->
m_pcMvd + iOffset,
m_pcMvd + uiOffset, iSizeInTComMv );
127 template <
typename T>
137 for ( i = 0; i < numElements; i++ )
145 for ( i = 0; i < numElements; i++ )
153 for ( i = 0; i < numElements; i++ )
156 p[ i + 2 * numElements ] = val;
162 for ( i = 0; i < numElements; i++)
169 Int iCurrPartNumQ = numElements>>2;
173 T *pT2 = p + iCurrPartNumQ;
174 for (i = 0; i < (iCurrPartNumQ>>1); i++)
183 for (i = 0; i < (iCurrPartNumQ>>1); i++)
188 pT = p + iCurrPartNumQ;
189 for (i = 0; i < ( (iCurrPartNumQ>>1) + (iCurrPartNumQ<<1) ); i++)
198 Int iCurrPartNumQ = numElements>>2;
202 for (i = 0; i < ( (iCurrPartNumQ>>1) + (iCurrPartNumQ<<1) ); i++)
206 pT = p + ( numElements - iCurrPartNumQ );
207 for (i = 0; i < (iCurrPartNumQ>>1); i++)
215 T *pT2 = p + iCurrPartNumQ;
216 for (i = 0; i < (iCurrPartNumQ>>1); i++)
226 Int iCurrPartNumQ = numElements>>2;
230 T *pT2 = p + (iCurrPartNumQ<<1);
231 T *pT3 = p + (iCurrPartNumQ>>1);
232 T *pT4 = p + (iCurrPartNumQ<<1) + (iCurrPartNumQ>>1);
234 for (i = 0; i < (iCurrPartNumQ>>2); i++)
245 T *pT2 = p + (iCurrPartNumQ<<1);
246 for (i = 0; i < (iCurrPartNumQ>>2); i++)
252 pT = p + (iCurrPartNumQ>>1);
253 pT2 = p + (iCurrPartNumQ<<1) + (iCurrPartNumQ>>1);
254 for (i = 0; i < ( (iCurrPartNumQ>>2) + iCurrPartNumQ ); i++)
264 Int iCurrPartNumQ = numElements>>2;
268 T *pT2 = p + (iCurrPartNumQ<<1);
269 for (i = 0; i < ( (iCurrPartNumQ>>2) + iCurrPartNumQ ); i++)
275 pT = p + iCurrPartNumQ + (iCurrPartNumQ>>1);
276 pT2 = p + numElements - iCurrPartNumQ + (iCurrPartNumQ>>1);
277 for (i = 0; i < (iCurrPartNumQ>>2); i++)
286 T *pT2 = p + (iCurrPartNumQ>>1);
287 T *pT3 = p + (iCurrPartNumQ<<1);
288 T *pT4 = p + (iCurrPartNumQ<<1) + (iCurrPartNumQ>>1);
289 for (i = 0; i < (iCurrPartNumQ>>2); i++)
307 setAll(
m_pcMv, mv, eCUMode, iPartAddr, uiDepth, iPartIdx);
317 setAll(
m_piRefIdx, static_cast<SChar>(iRefIdx), eCUMode, iPartAddr, uiDepth, iPartIdx);
322 setAllMv ( mvField.
getMv(), eCUMode, iPartAddr, uiDepth, iPartIdx );
330 #if REDUCED_ENCODER_MEMORY
333 const Int numSubpartsWithIdenticalMotion = scale * scale;
334 assert( numSubpartsWithIdenticalMotion > 0 && numSubpartsWithIdenticalMotion <=
m_uiNumPartition);
337 for (
Int partIdx = 0; partIdx <
m_uiNumPartition; partIdx += numSubpartsWithIdenticalMotion )
342 cMv = source.
m_pcMv[ partIdx ];
345 for (
Int i = 0; i < numSubpartsWithIdenticalMotion; i++ )
347 m_pcMv[ partIdx + i ] = cMv;
348 pePredMode[ partIdx + i ] = predMode;
356 Int N = scale * scale;
364 cMv =
m_pcMv[ uiPartIdx ];
367 for (
Int i = 0; i < N; i++ )
369 m_pcMv[ uiPartIdx + i ] = cMv;
370 pePredMode[ uiPartIdx + i ] = predMode;
376 static const Int NOT_VALID
Void setAllRefIdx(Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0)
TComMv const & getMv() const
class for motion vector with reference index
symmetric motion partition, 2Nx N
Void copyFrom(TComCUMvField const *pcCUMvFieldSrc, Int iNumPartSrc, Int iPartAddrDst)
class for motion information in one CU
PartSize
supported partition shape
symmetric motion partition, 2Nx2N
Void setAllMvField(TComMvField const &mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0)
Void setAll(T *p, T const &val, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx)
asymmetric motion partition, 2Nx( N/2) + 2Nx(3N/2)
asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
motion information handling classes (header)
Void copyTo(TComCUMvField *pcCUMvFieldDst, Int iPartAddrDst) const
Void compress(SChar *pePredMode, const SChar *pePredModeSource, const Int scale, const TComCUMvField &source)
asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
Void setAllMvd(TComMv const &rcMvd, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0)
basic motion vector class
PredMode
supported prediction type
asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
symmetric motion partition, Nx N
Void create(UInt uiNumPartition)
Void setAllMv(TComMv const &rcMv, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0)
symmetric motion partition, Nx2N