Commit 7ca517f7 authored by John Koleszar's avatar John Koleszar
Browse files

Replace as_mv struct with array

Replace as_mv.{first, second} with a two element array, so that they
can easily be processed with an index variable.

Change-Id: I1e429155544d2a94a5b72a5b467c53d8b8728190
parent dc836109
...@@ -218,10 +218,7 @@ union b_mode_info { ...@@ -218,10 +218,7 @@ union b_mode_info {
B_PREDICTION_MODE context; B_PREDICTION_MODE context;
#endif #endif
} as_mode; } as_mode;
struct { int_mv as_mv[2]; // first, second inter predictor motion vectors
int_mv first;
int_mv second;
} as_mv;
}; };
typedef enum { typedef enum {
......
...@@ -129,8 +129,8 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, ...@@ -129,8 +129,8 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
mb_index = (b_row >> 2) * (cols + 1) + (b_col >> 2); mb_index = (b_row >> 2) * (cols + 1) + (b_col >> 2);
bindex = (b_row & 3) * 4 + (b_col & 3); bindex = (b_row & 3) * 4 + (b_col & 3);
fprintf(mvs, "%3d:%-3d ", fprintf(mvs, "%3d:%-3d ",
mi[mb_index].bmi[bindex].as_mv.first.as_mv.row, mi[mb_index].bmi[bindex].as_mv[0].as_mv.row,
mi[mb_index].bmi[bindex].as_mv.first.as_mv.col); mi[mb_index].bmi[bindex].as_mv[0].as_mv.col);
} }
......
...@@ -98,7 +98,7 @@ static int left_block_mv(const MACROBLOCKD *xd, ...@@ -98,7 +98,7 @@ static int left_block_mv(const MACROBLOCKD *xd,
b += 4; b += 4;
} }
return (cur_mb->bmi + b - 1)->as_mv.first.as_int; return (cur_mb->bmi + b - 1)->as_mv[0].as_int;
} }
static int left_block_second_mv(const MACROBLOCKD *xd, static int left_block_second_mv(const MACROBLOCKD *xd,
...@@ -117,8 +117,8 @@ static int left_block_second_mv(const MACROBLOCKD *xd, ...@@ -117,8 +117,8 @@ static int left_block_second_mv(const MACROBLOCKD *xd,
} }
return cur_mb->mbmi.second_ref_frame > 0 ? return cur_mb->mbmi.second_ref_frame > 0 ?
(cur_mb->bmi + b - 1)->as_mv.second.as_int : (cur_mb->bmi + b - 1)->as_mv[1].as_int :
(cur_mb->bmi + b - 1)->as_mv.first.as_int; (cur_mb->bmi + b - 1)->as_mv[0].as_int;
} }
static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) { static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) {
...@@ -131,7 +131,7 @@ static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) { ...@@ -131,7 +131,7 @@ static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) {
b += 16; b += 16;
} }
return (cur_mb->bmi + b - 4)->as_mv.first.as_int; return (cur_mb->bmi + b - 4)->as_mv[0].as_int;
} }
static int above_block_second_mv(const MODE_INFO *cur_mb, int b, int mi_stride) { static int above_block_second_mv(const MODE_INFO *cur_mb, int b, int mi_stride) {
...@@ -146,8 +146,8 @@ static int above_block_second_mv(const MODE_INFO *cur_mb, int b, int mi_stride) ...@@ -146,8 +146,8 @@ static int above_block_second_mv(const MODE_INFO *cur_mb, int b, int mi_stride)
} }
return cur_mb->mbmi.second_ref_frame > 0 ? return cur_mb->mbmi.second_ref_frame > 0 ?
(cur_mb->bmi + b - 4)->as_mv.second.as_int : (cur_mb->bmi + b - 4)->as_mv[1].as_int :
(cur_mb->bmi + b - 4)->as_mv.first.as_int; (cur_mb->bmi + b - 4)->as_mv[0].as_int;
} }
static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) { static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) {
......
...@@ -154,7 +154,7 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, ...@@ -154,7 +154,7 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch,
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
mv.as_int = d->bmi.as_mv.first.as_int; mv.as_int = d->bmi.as_mv[0].as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3); (mv.as_mv.col >> 3);
...@@ -179,7 +179,7 @@ void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, ...@@ -179,7 +179,7 @@ void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
int_mv mv; int_mv mv;
ptr_base = *(d->base_second_pre); ptr_base = *(d->base_second_pre);
mv.as_int = d->bmi.as_mv.second.as_int; mv.as_int = d->bmi.as_mv[1].as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3); (mv.as_mv.col >> 3);
...@@ -197,7 +197,7 @@ void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) { ...@@ -197,7 +197,7 @@ void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
mv.as_int = d->bmi.as_mv.first.as_int; mv.as_int = d->bmi.as_mv[0].as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3); (mv.as_mv.col >> 3);
...@@ -222,7 +222,7 @@ void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd, ...@@ -222,7 +222,7 @@ void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
int_mv mv; int_mv mv;
ptr_base = *(d->base_second_pre); ptr_base = *(d->base_second_pre);
mv.as_int = d->bmi.as_mv.second.as_int; mv.as_int = d->bmi.as_mv[1].as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3); (mv.as_mv.col >> 3);
...@@ -240,7 +240,7 @@ static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) { ...@@ -240,7 +240,7 @@ static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
mv.as_int = d->bmi.as_mv.first.as_int; mv.as_int = d->bmi.as_mv[0].as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3); (mv.as_mv.col >> 3);
...@@ -264,38 +264,38 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) { ...@@ -264,38 +264,38 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
int voffset = 20 + i * 2 + j; int voffset = 20 + i * 2 + j;
int temp; int temp;
temp = blockd[yoffset ].bmi.as_mv.first.as_mv.row temp = blockd[yoffset ].bmi.as_mv[0].as_mv.row
+ blockd[yoffset + 1].bmi.as_mv.first.as_mv.row + blockd[yoffset + 1].bmi.as_mv[0].as_mv.row
+ blockd[yoffset + 4].bmi.as_mv.first.as_mv.row + blockd[yoffset + 4].bmi.as_mv[0].as_mv.row
+ blockd[yoffset + 5].bmi.as_mv.first.as_mv.row; + blockd[yoffset + 5].bmi.as_mv[0].as_mv.row;
if (temp < 0) temp -= 4; if (temp < 0) temp -= 4;
else temp += 4; else temp += 4;
xd->block[uoffset].bmi.as_mv.first.as_mv.row = (temp / 8) & xd->block[uoffset].bmi.as_mv[0].as_mv.row = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
temp = blockd[yoffset ].bmi.as_mv.first.as_mv.col temp = blockd[yoffset ].bmi.as_mv[0].as_mv.col
+ blockd[yoffset + 1].bmi.as_mv.first.as_mv.col + blockd[yoffset + 1].bmi.as_mv[0].as_mv.col
+ blockd[yoffset + 4].bmi.as_mv.first.as_mv.col + blockd[yoffset + 4].bmi.as_mv[0].as_mv.col
+ blockd[yoffset + 5].bmi.as_mv.first.as_mv.col; + blockd[yoffset + 5].bmi.as_mv[0].as_mv.col;
if (temp < 0) temp -= 4; if (temp < 0) temp -= 4;
else temp += 4; else temp += 4;
blockd[uoffset].bmi.as_mv.first.as_mv.col = (temp / 8) & blockd[uoffset].bmi.as_mv[0].as_mv.col = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
blockd[voffset].bmi.as_mv.first.as_mv.row = blockd[voffset].bmi.as_mv[0].as_mv.row =
blockd[uoffset].bmi.as_mv.first.as_mv.row; blockd[uoffset].bmi.as_mv[0].as_mv.row;
blockd[voffset].bmi.as_mv.first.as_mv.col = blockd[voffset].bmi.as_mv[0].as_mv.col =
blockd[uoffset].bmi.as_mv.first.as_mv.col; blockd[uoffset].bmi.as_mv[0].as_mv.col;
if (xd->mode_info_context->mbmi.second_ref_frame > 0) { if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
temp = blockd[yoffset ].bmi.as_mv.second.as_mv.row temp = blockd[yoffset ].bmi.as_mv[1].as_mv.row
+ blockd[yoffset + 1].bmi.as_mv.second.as_mv.row + blockd[yoffset + 1].bmi.as_mv[1].as_mv.row
+ blockd[yoffset + 4].bmi.as_mv.second.as_mv.row + blockd[yoffset + 4].bmi.as_mv[1].as_mv.row
+ blockd[yoffset + 5].bmi.as_mv.second.as_mv.row; + blockd[yoffset + 5].bmi.as_mv[1].as_mv.row;
if (temp < 0) { if (temp < 0) {
temp -= 4; temp -= 4;
...@@ -303,13 +303,13 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) { ...@@ -303,13 +303,13 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
temp += 4; temp += 4;
} }
blockd[uoffset].bmi.as_mv.second.as_mv.row = (temp / 8) & blockd[uoffset].bmi.as_mv[1].as_mv.row = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
temp = blockd[yoffset ].bmi.as_mv.second.as_mv.col temp = blockd[yoffset ].bmi.as_mv[1].as_mv.col
+ blockd[yoffset + 1].bmi.as_mv.second.as_mv.col + blockd[yoffset + 1].bmi.as_mv[1].as_mv.col
+ blockd[yoffset + 4].bmi.as_mv.second.as_mv.col + blockd[yoffset + 4].bmi.as_mv[1].as_mv.col
+ blockd[yoffset + 5].bmi.as_mv.second.as_mv.col; + blockd[yoffset + 5].bmi.as_mv[1].as_mv.col;
if (temp < 0) { if (temp < 0) {
temp -= 4; temp -= 4;
...@@ -317,13 +317,13 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) { ...@@ -317,13 +317,13 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
temp += 4; temp += 4;
} }
blockd[uoffset].bmi.as_mv.second.as_mv.col = (temp / 8) & blockd[uoffset].bmi.as_mv[1].as_mv.col = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
blockd[voffset].bmi.as_mv.second.as_mv.row = blockd[voffset].bmi.as_mv[1].as_mv.row =
blockd[uoffset].bmi.as_mv.second.as_mv.row; blockd[uoffset].bmi.as_mv[1].as_mv.row;
blockd[voffset].bmi.as_mv.second.as_mv.col = blockd[voffset].bmi.as_mv[1].as_mv.col =
blockd[uoffset].bmi.as_mv.second.as_mv.col; blockd[uoffset].bmi.as_mv[1].as_mv.col;
} }
} }
} }
...@@ -332,7 +332,7 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) { ...@@ -332,7 +332,7 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
BLOCKD *d0 = &blockd[i]; BLOCKD *d0 = &blockd[i];
BLOCKD *d1 = &blockd[i + 1]; BLOCKD *d1 = &blockd[i + 1];
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int) if (d0->bmi.as_mv[0].as_int == d1->bmi.as_mv[0].as_int)
build_inter_predictors2b(xd, d0, 8); build_inter_predictors2b(xd, d0, 8);
else { else {
vp9_build_inter_predictors_b(d0, 8, &xd->subpix); vp9_build_inter_predictors_b(d0, 8, &xd->subpix);
...@@ -717,15 +717,15 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) { ...@@ -717,15 +717,15 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) {
blockd[10].bmi = xd->mode_info_context->bmi[10]; blockd[10].bmi = xd->mode_info_context->bmi[10];
if (mbmi->need_to_clamp_mvs) { if (mbmi->need_to_clamp_mvs) {
clamp_mv_to_umv_border(&blockd[ 0].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 0].bmi.as_mv[0].as_mv, xd);
clamp_mv_to_umv_border(&blockd[ 2].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 2].bmi.as_mv[0].as_mv, xd);
clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv[0].as_mv, xd);
clamp_mv_to_umv_border(&blockd[10].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[10].bmi.as_mv[0].as_mv, xd);
if (mbmi->second_ref_frame > 0) { if (mbmi->second_ref_frame > 0) {
clamp_mv_to_umv_border(&blockd[ 0].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 0].bmi.as_mv[1].as_mv, xd);
clamp_mv_to_umv_border(&blockd[ 2].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 2].bmi.as_mv[1].as_mv, xd);
clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv[1].as_mv, xd);
clamp_mv_to_umv_border(&blockd[10].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[10].bmi.as_mv[1].as_mv, xd);
} }
} }
...@@ -750,15 +750,15 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) { ...@@ -750,15 +750,15 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) {
blockd[i + 1].bmi = xd->mode_info_context->bmi[i + 1]; blockd[i + 1].bmi = xd->mode_info_context->bmi[i + 1];
if (mbmi->need_to_clamp_mvs) { if (mbmi->need_to_clamp_mvs) {
clamp_mv_to_umv_border(&blockd[i + 0].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[i + 0].bmi.as_mv[0].as_mv, xd);
clamp_mv_to_umv_border(&blockd[i + 1].bmi.as_mv.first.as_mv, xd); clamp_mv_to_umv_border(&blockd[i + 1].bmi.as_mv[0].as_mv, xd);
if (mbmi->second_ref_frame > 0) { if (mbmi->second_ref_frame > 0) {
clamp_mv_to_umv_border(&blockd[i + 0].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[i + 0].bmi.as_mv[1].as_mv, xd);
clamp_mv_to_umv_border(&blockd[i + 1].bmi.as_mv.second.as_mv, xd); clamp_mv_to_umv_border(&blockd[i + 1].bmi.as_mv[1].as_mv, xd);
} }
} }
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int) if (d0->bmi.as_mv[0].as_int == d1->bmi.as_mv[0].as_int)
build_inter_predictors2b(xd, d0, 16); build_inter_predictors2b(xd, d0, 16);
else { else {
vp9_build_inter_predictors_b(d0, 16, &xd->subpix); vp9_build_inter_predictors_b(d0, 16, &xd->subpix);
...@@ -776,7 +776,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) { ...@@ -776,7 +776,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) {
BLOCKD *d0 = &blockd[i]; BLOCKD *d0 = &blockd[i];
BLOCKD *d1 = &blockd[i + 1]; BLOCKD *d1 = &blockd[i + 1];
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int) if (d0->bmi.as_mv[0].as_int == d1->bmi.as_mv[0].as_int)
build_inter_predictors2b(xd, d0, 8); build_inter_predictors2b(xd, d0, 8);
else { else {
vp9_build_inter_predictors_b(d0, 8, &xd->subpix); vp9_build_inter_predictors_b(d0, 8, &xd->subpix);
...@@ -803,44 +803,44 @@ void build_4x4uvmvs(MACROBLOCKD *xd) { ...@@ -803,44 +803,44 @@ void build_4x4uvmvs(MACROBLOCKD *xd) {
int temp; int temp;
temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.first.as_mv.row temp = xd->mode_info_context->bmi[yoffset + 0].as_mv[0].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 1].as_mv.first.as_mv.row + xd->mode_info_context->bmi[yoffset + 1].as_mv[0].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 4].as_mv.first.as_mv.row + xd->mode_info_context->bmi[yoffset + 4].as_mv[0].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 5].as_mv.first.as_mv.row; + xd->mode_info_context->bmi[yoffset + 5].as_mv[0].as_mv.row;
if (temp < 0) temp -= 4; if (temp < 0) temp -= 4;
else temp += 4; else temp += 4;
blockd[uoffset].bmi.as_mv.first.as_mv.row = (temp / 8) & blockd[uoffset].bmi.as_mv[0].as_mv.row = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.first.as_mv.col temp = xd->mode_info_context->bmi[yoffset + 0].as_mv[0].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 1].as_mv.first.as_mv.col + xd->mode_info_context->bmi[yoffset + 1].as_mv[0].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 4].as_mv.first.as_mv.col + xd->mode_info_context->bmi[yoffset + 4].as_mv[0].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 5].as_mv.first.as_mv.col; + xd->mode_info_context->bmi[yoffset + 5].as_mv[0].as_mv.col;
if (temp < 0) temp -= 4; if (temp < 0) temp -= 4;
else temp += 4; else temp += 4;
blockd[uoffset].bmi.as_mv.first.as_mv.col = (temp / 8) & blockd[uoffset].bmi.as_mv[0].as_mv.col = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
// if (x->mode_info_context->mbmi.need_to_clamp_mvs) // if (x->mode_info_context->mbmi.need_to_clamp_mvs)
clamp_uvmv_to_umv_border(&blockd[uoffset].bmi.as_mv.first.as_mv, xd); clamp_uvmv_to_umv_border(&blockd[uoffset].bmi.as_mv[0].as_mv, xd);
// if (x->mode_info_context->mbmi.need_to_clamp_mvs) // if (x->mode_info_context->mbmi.need_to_clamp_mvs)
clamp_uvmv_to_umv_border(&blockd[uoffset].bmi.as_mv.first.as_mv, xd); clamp_uvmv_to_umv_border(&blockd[uoffset].bmi.as_mv[0].as_mv, xd);
blockd[voffset].bmi.as_mv.first.as_mv.row = blockd[voffset].bmi.as_mv[0].as_mv.row =
blockd[uoffset].bmi.as_mv.first.as_mv.row; blockd[uoffset].bmi.as_mv[0].as_mv.row;
blockd[voffset].bmi.as_mv.first.as_mv.col = blockd[voffset].bmi.as_mv[0].as_mv.col =
blockd[uoffset].bmi.as_mv.first.as_mv.col; blockd[uoffset].bmi.as_mv[0].as_mv.col;
if (xd->mode_info_context->mbmi.second_ref_frame > 0) { if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.second.as_mv.row temp = xd->mode_info_context->bmi[yoffset + 0].as_mv[1].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 1].as_mv.second.as_mv.row + xd->mode_info_context->bmi[yoffset + 1].as_mv[1].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 4].as_mv.second.as_mv.row + xd->mode_info_context->bmi[yoffset + 4].as_mv[1].as_mv.row
+ xd->mode_info_context->bmi[yoffset + 5].as_mv.second.as_mv.row; + xd->mode_info_context->bmi[yoffset + 5].as_mv[1].as_mv.row;
if (temp < 0) { if (temp < 0) {
temp -= 4; temp -= 4;
...@@ -848,13 +848,13 @@ void build_4x4uvmvs(MACROBLOCKD *xd) { ...@@ -848,13 +848,13 @@ void build_4x4uvmvs(MACROBLOCKD *xd) {
temp += 4; temp += 4;
} }
blockd[uoffset].bmi.as_mv.second.as_mv.row = (temp / 8) & blockd[uoffset].bmi.as_mv[1].as_mv.row = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.second.as_mv.col temp = xd->mode_info_context->bmi[yoffset + 0].as_mv[1].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 1].as_mv.second.as_mv.col + xd->mode_info_context->bmi[yoffset + 1].as_mv[1].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 4].as_mv.second.as_mv.col + xd->mode_info_context->bmi[yoffset + 4].as_mv[1].as_mv.col
+ xd->mode_info_context->bmi[yoffset + 5].as_mv.second.as_mv.col; + xd->mode_info_context->bmi[yoffset + 5].as_mv[1].as_mv.col;
if (temp < 0) { if (temp < 0) {
temp -= 4; temp -= 4;
...@@ -862,21 +862,21 @@ void build_4x4uvmvs(MACROBLOCKD *xd) { ...@@ -862,21 +862,21 @@ void build_4x4uvmvs(MACROBLOCKD *xd) {
temp += 4; temp += 4;
} }
blockd[uoffset].bmi.as_mv.second.as_mv.col = (temp / 8) & blockd[uoffset].bmi.as_mv[1].as_mv.col = (temp / 8) &
xd->fullpixel_mask; xd->fullpixel_mask;
// if (mbmi->need_to_clamp_mvs) // if (mbmi->need_to_clamp_mvs)
clamp_uvmv_to_umv_border( clamp_uvmv_to_umv_border(
&blockd[uoffset].bmi.as_mv.second.as_mv, xd); &blockd[uoffset].bmi.as_mv[1].as_mv, xd);
// if (mbmi->need_to_clamp_mvs) // if (mbmi->need_to_clamp_mvs)
clamp_uvmv_to_umv_border( clamp_uvmv_to_umv_border(
&blockd[uoffset].bmi.as_mv.second.as_mv, xd); &blockd[uoffset].bmi.as_mv[1].as_mv, xd);
blockd[voffset].bmi.as_mv.second.as_mv.row = blockd[voffset].bmi.as_mv[1].as_mv.row =
blockd[uoffset].bmi.as_mv.second.as_mv.row; blockd[uoffset].bmi.as_mv[1].as_mv.row;
blockd[voffset].bmi.as_mv.second.as_mv.col = blockd[voffset].bmi.as_mv[1].as_mv.col =
blockd[uoffset].bmi.as_mv.second.as_mv.col; blockd[uoffset].bmi.as_mv[1].as_mv.col;
} }
} }
} }
......
...@@ -1041,9 +1041,9 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, ...@@ -1041,9 +1041,9 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
fill_offset = &mbsplit_fill_offset[s][(unsigned char)j * mbsplit_fill_count[s]]; fill_offset = &mbsplit_fill_offset[s][(unsigned char)j * mbsplit_fill_count[s]];
do { do {
mi->bmi[ *fill_offset].as_mv.first.as_int = blockmv.as_int; mi->bmi[ *fill_offset].as_mv[0].as_int = blockmv.as_int;
if (mbmi->second_ref_frame > 0) if (mbmi->second_ref_frame > 0)
mi->bmi[ *fill_offset].as_mv.second.as_int = secondmv.as_int; mi->bmi[ *fill_offset].as_mv[1].as_int = secondmv.as_int;
fill_offset++; fill_offset++;
} while (--fill_count); } while (--fill_count);
} }
...@@ -1051,8 +1051,8 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, ...@@ -1051,8 +1051,8 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
} while (++j < num_p); } while (++j < num_p);
} }
mv->as_int = mi->bmi[15].as_mv.first.as_int; mv->as_int = mi->bmi[15].as_mv[0].as_int;
mbmi->mv[1].as_int = mi->bmi[15].as_mv.second.as_int; mbmi->mv[1].as_int = mi->bmi[15].as_mv[1].as_int;
break; /* done with SPLITMV */ break; /* done with SPLITMV */
......
...@@ -1546,7 +1546,7 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, ...@@ -1546,7 +1546,7 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
uint8_t *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv[0];
int_mv this_mv; int_mv this_mv;
int bestsad = INT_MAX; int bestsad = INT_MAX;
int r, c; int r, c;
...@@ -1641,7 +1641,7 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, ...@@ -1641,7 +1641,7 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
uint8_t *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv[0];
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = INT_MAX; unsigned int bestsad = INT_MAX;
int r, c; int r, c;
...@@ -1770,7 +1770,7 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, ...@@ -1770,7 +1770,7 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
uint8_t *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv[0];