*(uint64_t*)h->mb.cache.direct_mv[1][x264_scan8[idx*4]+8];
}
-#define FIXED_SCALE 256
-
/* This just improves encoder performance, it's not part of the spec */
void x264_mb_predict_mv_ref16x16( x264_t *h, int i_list, int i_ref, int16_t mvc[8][2], int *i_mvc )
{
if( ref_col >= 0 ) \
{ \
int scale = (h->fdec->i_poc - h->fdec->ref_poc[0][i_ref]) * l0->inv_ref_poc[ref_col];\
- mvc[i][0] = l0->mv[0][i_b4][0] * scale / FIXED_SCALE; \
- mvc[i][1] = l0->mv[0][i_b4][1] * scale / FIXED_SCALE; \
+ mvc[i][0] = (l0->mv[0][i_b4][0]*scale + 128) >> 8;\
+ mvc[i][1] = (l0->mv[0][i_b4][1]*scale + 128) >> 8;\
i++; \
} \
}
for( i = 0; i < h->i_ref0; i++ )
{
int delta = h->fdec->i_poc - h->fref0[i]->i_poc;
- h->fdec->inv_ref_poc[i] = (FIXED_SCALE + delta/2) / delta;
+ h->fdec->inv_ref_poc[i] = (256 + delta/2) / delta;
}
}