int_mv mv;
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 +
(mv.as_mv.col >> 3);
int_mv mv;
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 +
(mv.as_mv.col >> 3);
int_mv mv;
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 +
(mv.as_mv.col >> 3);
int_mv mv;
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 +
(mv.as_mv.col >> 3);
int_mv mv;
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 +
(mv.as_mv.col >> 3);
int voffset = 20 + i * 2 + j;
int temp;
- temp = blockd[yoffset ].bmi.as_mv.first.as_mv.row
- + blockd[yoffset + 1].bmi.as_mv.first.as_mv.row
- + blockd[yoffset + 4].bmi.as_mv.first.as_mv.row
- + blockd[yoffset + 5].bmi.as_mv.first.as_mv.row;
+ temp = blockd[yoffset ].bmi.as_mv[0].as_mv.row
+ + blockd[yoffset + 1].bmi.as_mv[0].as_mv.row
+ + blockd[yoffset + 4].bmi.as_mv[0].as_mv.row
+ + blockd[yoffset + 5].bmi.as_mv[0].as_mv.row;
if (temp < 0) 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;
- temp = blockd[yoffset ].bmi.as_mv.first.as_mv.col
- + blockd[yoffset + 1].bmi.as_mv.first.as_mv.col
- + blockd[yoffset + 4].bmi.as_mv.first.as_mv.col
- + blockd[yoffset + 5].bmi.as_mv.first.as_mv.col;
+ temp = blockd[yoffset ].bmi.as_mv[0].as_mv.col
+ + blockd[yoffset + 1].bmi.as_mv[0].as_mv.col
+ + blockd[yoffset + 4].bmi.as_mv[0].as_mv.col
+ + blockd[yoffset + 5].bmi.as_mv[0].as_mv.col;
if (temp < 0) 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;
- blockd[voffset].bmi.as_mv.first.as_mv.row =
- blockd[uoffset].bmi.as_mv.first.as_mv.row;
- blockd[voffset].bmi.as_mv.first.as_mv.col =
- blockd[uoffset].bmi.as_mv.first.as_mv.col;
+ blockd[voffset].bmi.as_mv[0].as_mv.row =
+ blockd[uoffset].bmi.as_mv[0].as_mv.row;
+ blockd[voffset].bmi.as_mv[0].as_mv.col =
+ blockd[uoffset].bmi.as_mv[0].as_mv.col;
if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
- temp = blockd[yoffset ].bmi.as_mv.second.as_mv.row
- + blockd[yoffset + 1].bmi.as_mv.second.as_mv.row
- + blockd[yoffset + 4].bmi.as_mv.second.as_mv.row
- + blockd[yoffset + 5].bmi.as_mv.second.as_mv.row;
+ temp = blockd[yoffset ].bmi.as_mv[1].as_mv.row
+ + blockd[yoffset + 1].bmi.as_mv[1].as_mv.row
+ + blockd[yoffset + 4].bmi.as_mv[1].as_mv.row
+ + blockd[yoffset + 5].bmi.as_mv[1].as_mv.row;
if (temp < 0) {
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;
- temp = blockd[yoffset ].bmi.as_mv.second.as_mv.col
- + blockd[yoffset + 1].bmi.as_mv.second.as_mv.col
- + blockd[yoffset + 4].bmi.as_mv.second.as_mv.col
- + blockd[yoffset + 5].bmi.as_mv.second.as_mv.col;
+ temp = blockd[yoffset ].bmi.as_mv[1].as_mv.col
+ + blockd[yoffset + 1].bmi.as_mv[1].as_mv.col
+ + blockd[yoffset + 4].bmi.as_mv[1].as_mv.col
+ + blockd[yoffset + 5].bmi.as_mv[1].as_mv.col;
if (temp < 0) {
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;
- blockd[voffset].bmi.as_mv.second.as_mv.row =
- blockd[uoffset].bmi.as_mv.second.as_mv.row;
- blockd[voffset].bmi.as_mv.second.as_mv.col =
- blockd[uoffset].bmi.as_mv.second.as_mv.col;
+ blockd[voffset].bmi.as_mv[1].as_mv.row =
+ blockd[uoffset].bmi.as_mv[1].as_mv.row;
+ blockd[voffset].bmi.as_mv[1].as_mv.col =
+ blockd[uoffset].bmi.as_mv[1].as_mv.col;
}
}
}
BLOCKD *d0 = &blockd[i];
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);
else {
vp9_build_inter_predictors_b(d0, 8, &xd->subpix);
blockd[10].bmi = xd->mode_info_context->bmi[10];
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[ 2].bmi.as_mv.first.as_mv, xd);
- clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv.first.as_mv, xd);
- clamp_mv_to_umv_border(&blockd[10].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[0].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[0].as_mv, xd);
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[ 2].bmi.as_mv.second.as_mv, xd);
- clamp_mv_to_umv_border(&blockd[ 8].bmi.as_mv.second.as_mv, xd);
- clamp_mv_to_umv_border(&blockd[10].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[1].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[1].as_mv, xd);
}
}
blockd[i + 1].bmi = xd->mode_info_context->bmi[i + 1];
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 + 1].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[0].as_mv, xd);
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 + 1].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[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);
else {
vp9_build_inter_predictors_b(d0, 16, &xd->subpix);
BLOCKD *d0 = &blockd[i];
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);
else {
vp9_build_inter_predictors_b(d0, 8, &xd->subpix);
int temp;
- temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.first.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 1].as_mv.first.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 4].as_mv.first.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 5].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[0].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[0].as_mv.row;
if (temp < 0) 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;
- temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.first.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 1].as_mv.first.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 4].as_mv.first.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 5].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[0].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[0].as_mv.col;
if (temp < 0) 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;
// 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)
- 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[uoffset].bmi.as_mv.first.as_mv.row;
- blockd[voffset].bmi.as_mv.first.as_mv.col =
- blockd[uoffset].bmi.as_mv.first.as_mv.col;
+ blockd[voffset].bmi.as_mv[0].as_mv.row =
+ blockd[uoffset].bmi.as_mv[0].as_mv.row;
+ blockd[voffset].bmi.as_mv[0].as_mv.col =
+ blockd[uoffset].bmi.as_mv[0].as_mv.col;
if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
- temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.second.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 1].as_mv.second.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 4].as_mv.second.as_mv.row
- + xd->mode_info_context->bmi[yoffset + 5].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[1].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[1].as_mv.row;
if (temp < 0) {
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;
- temp = xd->mode_info_context->bmi[yoffset + 0].as_mv.second.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 1].as_mv.second.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 4].as_mv.second.as_mv.col
- + xd->mode_info_context->bmi[yoffset + 5].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[1].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[1].as_mv.col;
if (temp < 0) {
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;
// if (mbmi->need_to_clamp_mvs)
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)
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[uoffset].bmi.as_mv.second.as_mv.row;
- blockd[voffset].bmi.as_mv.second.as_mv.col =
- blockd[uoffset].bmi.as_mv.second.as_mv.col;
+ blockd[voffset].bmi.as_mv[1].as_mv.row =
+ blockd[uoffset].bmi.as_mv[1].as_mv.row;
+ blockd[voffset].bmi.as_mv[1].as_mv.col =
+ blockd[uoffset].bmi.as_mv[1].as_mv.col;
}
}
}
}
break;
case LEFT4X4:
- this_mv->as_int = col ? d[-1].bmi.as_mv.first.as_int :
+ this_mv->as_int = col ? d[-1].bmi.as_mv[0].as_int :
left_block_mv(xd, mic, i);
if (mbmi->second_ref_frame > 0)
- this_second_mv->as_int = col ? d[-1].bmi.as_mv.second.as_int :
+ this_second_mv->as_int = col ? d[-1].bmi.as_mv[1].as_int :
left_block_second_mv(xd, mic, i);
break;
case ABOVE4X4:
- this_mv->as_int = row ? d[-4].bmi.as_mv.first.as_int :
+ this_mv->as_int = row ? d[-4].bmi.as_mv[0].as_int :
above_block_mv(mic, i, mis);
if (mbmi->second_ref_frame > 0)
- this_second_mv->as_int = row ? d[-4].bmi.as_mv.second.as_int :
+ this_second_mv->as_int = row ? d[-4].bmi.as_mv[1].as_int :
above_block_second_mv(mic, i, mis);
break;
case ZERO4X4:
int_mv left_mv, left_second_mv;
left_second_mv.as_int = 0;
- left_mv.as_int = col ? d[-1].bmi.as_mv.first.as_int :
+ left_mv.as_int = col ? d[-1].bmi.as_mv[0].as_int :
left_block_mv(xd, mic, i);
if (mbmi->second_ref_frame > 0)
- left_second_mv.as_int = col ? d[-1].bmi.as_mv.second.as_int :
+ left_second_mv.as_int = col ? d[-1].bmi.as_mv[1].as_int :
left_block_second_mv(xd, mic, i);
if (left_mv.as_int == this_mv->as_int &&
#endif
}
- d->bmi.as_mv.first.as_int = this_mv->as_int;
+ d->bmi.as_mv[0].as_int = this_mv->as_int;
if (mbmi->second_ref_frame > 0)
- d->bmi.as_mv.second.as_int = this_second_mv->as_int;
+ d->bmi.as_mv[1].as_int = this_second_mv->as_int;
x->partition_info->bmi[i].mode = m;
x->partition_info->bmi[i].mv.as_int = this_mv->as_int;
// use previous block's result as next block's MV predictor.
if (segmentation == PARTITIONING_4X4 && i > 0) {
- bsi->mvp.as_int = x->e_mbd.block[i - 1].bmi.as_mv.first.as_int;
+ bsi->mvp.as_int = x->e_mbd.block[i - 1].bmi.as_mv[0].as_int;
if (i == 4 || i == 8 || i == 12)
- bsi->mvp.as_int = x->e_mbd.block[i - 4].bmi.as_mv.first.as_int;
+ bsi->mvp.as_int = x->e_mbd.block[i - 4].bmi.as_mv[0].as_int;
step_param = 2;
}
}
if (thissme < bestsme) {
bestsme = thissme;
- mode_mv[NEW4X4].as_int = e->bmi.as_mv.first.as_int;
+ mode_mv[NEW4X4].as_int = e->bmi.as_mv[0].as_int;
} else {
/* The full search result is actually worse so re-instate the
* previous best vector */
- e->bmi.as_mv.first.as_int = mode_mv[NEW4X4].as_int;
+ e->bmi.as_mv[0].as_int = mode_mv[NEW4X4].as_int;
}
}
}
for (i = 0; i < 16; i++) {
BLOCKD *bd = &x->e_mbd.block[i];
- bd->bmi.as_mv.first.as_int = bsi.mvs[i].as_int;
+ bd->bmi.as_mv[0].as_int = bsi.mvs[i].as_int;
if (mbmi->second_ref_frame > 0)
- bd->bmi.as_mv.second.as_int = bsi.second_mvs[i].as_int;
+ bd->bmi.as_mv[1].as_int = bsi.second_mvs[i].as_int;
bd->eob = bsi.eobs[i];
}
x->nmvjointcost, x->mvcost,
&dis, &sse);
}
- d->bmi.as_mv.first.as_int = tmp_mv.as_int;
- frame_mv[NEWMV][refs[0]].as_int = d->bmi.as_mv.first.as_int;
+ d->bmi.as_mv[0].as_int = tmp_mv.as_int;
+ frame_mv[NEWMV][refs[0]].as_int = d->bmi.as_mv[0].as_int;
// Add the new motion vector cost to our rolling cost variable
*rate2 += vp9_mv_bit_cost(&tmp_mv, &ref_mv[0],
if (best_mbmode.mode == SPLITMV) {
for (i = 0; i < 16; i++)
- xd->mode_info_context->bmi[i].as_mv.first.as_int = best_bmodes[i].as_mv.first.as_int;
+ xd->mode_info_context->bmi[i].as_mv[0].as_int =
+ best_bmodes[i].as_mv[0].as_int;
if (mbmi->second_ref_frame > 0)
for (i = 0; i < 16; i++)
- xd->mode_info_context->bmi[i].as_mv.second.as_int = best_bmodes[i].as_mv.second.as_int;
+ xd->mode_info_context->bmi[i].as_mv[1].as_int =
+ best_bmodes[i].as_mv[1].as_int;
vpx_memcpy(x->partition_info, &best_partition, sizeof(PARTITION_INFO));