Пример #1
0
void_t PredInter8x16Mv(int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30], 
						int32_t iPartIdx, int8_t iRef, int16_t iMVP[2])
{
	if (0 == iPartIdx) 
	{
		const int8_t kiLeftRef = iRefIndex[0][6];
		if (iRef == kiLeftRef)
		{
			ST32( iMVP, LD32(&iMotionVector[0][6][0]) );
			return;
		}		
	}
	else // 1 == iPartIdx
	{
		int8_t iDiagonalRef = iRefIndex[0][5]; //top-right
		int8_t index = 5;
		if (REF_NOT_AVAIL == iDiagonalRef)
		{
			iDiagonalRef = iRefIndex[0][2]; //top-left for 8*8 block(index 1)
			index = 2;
		}
		if (iRef == iDiagonalRef) 
		{
			ST32( iMVP, LD32(&iMotionVector[0][index][0]) );
			return;
		}	
	}

	PredMv(iMotionVector, iRefIndex, iPartIdx, 2, iRef, iMVP);
}
Пример #2
0
void PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
                        int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]) {
  if (0 == iPartIdx) {
    const int8_t kiTopRef = iRefIndex[0][1];
    if (iRef == kiTopRef) {
      ST32 (iMVP, LD32 (&iMotionVector[0][1][0]));
      return;
    }
  } else { // 8 == iPartIdx
    const int8_t kiLeftRef = iRefIndex[0][18];
    if (iRef == kiLeftRef) {
      ST32 (iMVP, LD32 (&iMotionVector[0][18][0]));
      return;
    }
  }

  PredMv (iMotionVector, iRefIndex, iPartIdx, 4, iRef, iMVP);
}