int non_zero_count[X264_SCAN8_SIZE];
/* -1 if unused, -2 if unavailable */
- int8_t ref[2][X264_SCAN8_SIZE];
+ DECLARE_ALIGNED( int8_t, ref[2][X264_SCAN8_SIZE], 4 );
/* 0 if not available */
- int16_t mv[2][X264_SCAN8_SIZE][2];
- int16_t mvd[2][X264_SCAN8_SIZE][2];
+ DECLARE_ALIGNED( int16_t, mv[2][X264_SCAN8_SIZE][2], 16 );
+ DECLARE_ALIGNED( int16_t, mvd[2][X264_SCAN8_SIZE][2], 4 );
/* 1 if SKIP or DIRECT. set only for B-frames + CABAC */
- int8_t skip[X264_SCAN8_SIZE];
+ DECLARE_ALIGNED( int8_t, skip[X264_SCAN8_SIZE], 4 );
- int16_t direct_mv[2][X264_SCAN8_SIZE][2];
+ DECLARE_ALIGNED( int16_t, direct_mv[2][X264_SCAN8_SIZE][2], 16 ) ;
int8_t direct_ref[2][X264_SCAN8_SIZE];
int pskip_mv[2];
/* 8x8 */
int i_cost8x8;
- int mvc[32][5][2]; /* [ref][0] is 16x16 mv,
- [ref][1..4] are 8x8 mv from partition [0..3] */
+ /* [ref][0] is 16x16 mv, [ref][1..4] are 8x8 mv from partition [0..3] */
+ DECLARE_ALIGNED( int, mvc[32][5][2], 8 );
x264_me_t me8x8[4];
/* Sub 4x4 */
{
x264_me_t m;
uint8_t **p_fenc = h->mb.pic.p_fenc;
- int mvc[3][2];
+ DECLARE_ALIGNED( int, mvc[3][2], 8 );
int i, j;
/* XXX Needed for x264_mb_predict_mv */
{
x264_me_t m;
uint8_t **p_fenc = h->mb.pic.p_fenc;
- int mvc[3][2];
+ DECLARE_ALIGNED( int, mvc[3][2], 8 );
int i, j;
/* XXX Needed for x264_mb_predict_mv */
{ h->mb.pic.p_fref[0][a->l0.i_ref],
h->mb.pic.p_fref[1][a->l1.i_ref] };
DECLARE_ALIGNED( uint8_t, pix[2][16*8], 16 );
- int mvc[2][2];
+ DECLARE_ALIGNED( int, mvc[2][2], 8 );
int i, l;
h->mb.i_partition = D_16x8;
LOAD_FENC( m, h->mb.pic.p_fenc, 0, 8*i );
LOAD_HPELS( m, p_fref[l], l, lX->i_ref, 0, 8*i );
- mvc[0][0] = lX->me8x8[2*i].mv[0];
- mvc[0][1] = lX->me8x8[2*i].mv[1];
- mvc[1][0] = lX->me8x8[2*i+1].mv[0];
- mvc[1][1] = lX->me8x8[2*i+1].mv[1];
+ *(uint64_t*)mvc[0] = *(uint64_t*)lX->me8x8[2*i].mv;
+ *(uint64_t*)mvc[1] = *(uint64_t*)lX->me8x8[2*i+1].mv;
x264_mb_predict_mv( h, l, 8*i, 2, m->mvp );
x264_me_search( h, m, mvc, 2 );
{ h->mb.pic.p_fref[0][a->l0.i_ref],
h->mb.pic.p_fref[1][a->l1.i_ref] };
uint8_t pix[2][8*16];
- int mvc[2][2];
+ DECLARE_ALIGNED( int, mvc[2][2], 8 );
int i, l;
h->mb.i_partition = D_8x16;
LOAD_FENC( m, h->mb.pic.p_fenc, 8*i, 0 );
LOAD_HPELS( m, p_fref[l], l, lX->i_ref, 8*i, 0 );
- mvc[0][0] = lX->me8x8[i].mv[0];
- mvc[0][1] = lX->me8x8[i].mv[1];
- mvc[1][0] = lX->me8x8[i+2].mv[0];
- mvc[1][1] = lX->me8x8[i+2].mv[1];
+ *(uint64_t*)mvc[0] = *(uint64_t*)lX->me8x8[i].mv;
+ *(uint64_t*)mvc[1] = *(uint64_t*)lX->me8x8[i+2].mv;
x264_mb_predict_mv( h, l, 4*i, 2, m->mvp );
x264_me_search( h, m, mvc, 2 );