Remove predictor pointers from BLOCKD
Access these members from MACROBLOCKD instead. Change-Id: I2574622e577bb9feede47f6b7ccbb11f3e928ca8
This commit is contained in:
@@ -265,9 +265,11 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCKD *d,
|
||||
int offset;
|
||||
int usehp = xd->allow_high_precision_mv;
|
||||
|
||||
uint8_t *y = *(d->base_pre) + d->pre +
|
||||
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
|
||||
y_stride = d->pre_stride;
|
||||
uint8_t *y = xd->plane[0].pre[0].buf +
|
||||
(bestmv->as_mv.row) * xd->plane[0].pre[0].stride +
|
||||
bestmv->as_mv.col;
|
||||
|
||||
y_stride = xd->plane[0].pre[0].stride;
|
||||
|
||||
rr = ref_mv->as_mv.row;
|
||||
rc = ref_mv->as_mv.col;
|
||||
@@ -440,9 +442,10 @@ int vp9_find_best_sub_pixel_step(MACROBLOCK *x, BLOCKD *d,
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
int usehp = xd->allow_high_precision_mv;
|
||||
|
||||
uint8_t *y = *(d->base_pre) + d->pre +
|
||||
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
|
||||
y_stride = d->pre_stride;
|
||||
uint8_t *y = xd->plane[0].pre[0].buf +
|
||||
(bestmv->as_mv.row) * xd->plane[0].pre[0].stride +
|
||||
bestmv->as_mv.col;
|
||||
y_stride = xd->plane[0].pre[0].stride;
|
||||
|
||||
// central mv
|
||||
bestmv->as_mv.row <<= 3;
|
||||
@@ -940,9 +943,9 @@ int vp9_find_best_half_pixel_step(MACROBLOCK *x, BLOCKD *d,
|
||||
int y_stride;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
|
||||
uint8_t *y = *(d->base_pre) + d->pre +
|
||||
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
|
||||
y_stride = d->pre_stride;
|
||||
uint8_t *y = xd->plane[0].pre[0].buf +
|
||||
(bestmv->as_mv.row) * xd->plane[0].pre[0].stride + bestmv->as_mv.col;
|
||||
y_stride = xd->plane[0].pre[0].stride;
|
||||
|
||||
// central mv
|
||||
bestmv->as_mv.row <<= 3;
|
||||
@@ -1103,13 +1106,14 @@ int vp9_hex_search
|
||||
int *mvjcost, int *mvcost[2],
|
||||
int_mv *center_mv
|
||||
) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
MV hex[6] = { { -1, -2}, {1, -2}, {2, 0}, {1, 2}, { -1, 2}, { -2, 0} };
|
||||
MV neighbors[4] = {{0, -1}, { -1, 0}, {1, 0}, {0, 1}};
|
||||
int i, j;
|
||||
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
int br, bc;
|
||||
int_mv this_mv;
|
||||
unsigned int bestsad = 0x7fffffff;
|
||||
@@ -1130,8 +1134,8 @@ int vp9_hex_search
|
||||
bc = ref_mv->as_mv.col;
|
||||
|
||||
// Work out the start point for the search
|
||||
base_offset = (uint8_t *)(*(d->base_pre) + d->pre);
|
||||
this_offset = base_offset + (br * (d->pre_stride)) + bc;
|
||||
base_offset = (uint8_t *)(xd->plane[0].pre[0].buf);
|
||||
this_offset = base_offset + (br * (xd->plane[0].pre[0].stride)) + bc;
|
||||
this_mv.as_mv.row = br;
|
||||
this_mv.as_mv.col = bc;
|
||||
bestsad = vfp->sdf(what, what_stride, this_offset,
|
||||
@@ -1253,10 +1257,11 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCKD *d,
|
||||
int *mvcost[2], int_mv *center_mv) {
|
||||
int i, j, step;
|
||||
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
uint8_t *in_what;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *best_address;
|
||||
|
||||
int tot_steps;
|
||||
@@ -1272,7 +1277,6 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCKD *d,
|
||||
|
||||
uint8_t *check_here;
|
||||
int thissad;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
int_mv fcenter_mv;
|
||||
|
||||
int *mvjsadcost = x->nmvjointsadcost;
|
||||
@@ -1289,8 +1293,8 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCKD *d,
|
||||
best_mv->as_mv.col = ref_col;
|
||||
|
||||
// Work out the start point for the search
|
||||
in_what = (uint8_t *)(*(d->base_pre) + d->pre +
|
||||
(ref_row * (d->pre_stride)) + ref_col);
|
||||
in_what = (uint8_t *)(xd->plane[0].pre[0].buf +
|
||||
(ref_row * (xd->plane[0].pre[0].stride)) + ref_col);
|
||||
best_address = in_what;
|
||||
|
||||
// Check the starting position
|
||||
@@ -1364,10 +1368,11 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCKD *d,
|
||||
int *mvjcost, int *mvcost[2], int_mv *center_mv) {
|
||||
int i, j, step;
|
||||
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
uint8_t *in_what;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *best_address;
|
||||
|
||||
int tot_steps;
|
||||
@@ -1385,7 +1390,6 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCKD *d,
|
||||
|
||||
uint8_t *check_here;
|
||||
unsigned int thissad;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
int_mv fcenter_mv;
|
||||
|
||||
int *mvjsadcost = x->nmvjointsadcost;
|
||||
@@ -1402,8 +1406,8 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCKD *d,
|
||||
best_mv->as_mv.col = ref_col;
|
||||
|
||||
// Work out the start point for the search
|
||||
in_what = (uint8_t *)(*(d->base_pre) + d->pre +
|
||||
(ref_row * (d->pre_stride)) + ref_col);
|
||||
in_what = (uint8_t *)(xd->plane[0].pre[0].buf +
|
||||
(ref_row * (xd->plane[0].pre[0].stride)) + ref_col);
|
||||
best_address = in_what;
|
||||
|
||||
// Check the starting position
|
||||
@@ -1571,11 +1575,12 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost,
|
||||
int *mvcost[2],
|
||||
int_mv *center_mv) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
uint8_t *in_what;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int mv_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
int mv_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *bestaddress;
|
||||
int_mv *best_mv = &d->bmi.as_mv[0];
|
||||
int_mv this_mv;
|
||||
@@ -1584,7 +1589,6 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
|
||||
uint8_t *check_here;
|
||||
int thissad;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
|
||||
int ref_row = ref_mv->as_mv.row;
|
||||
int ref_col = ref_mv->as_mv.col;
|
||||
@@ -1602,8 +1606,8 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
fcenter_mv.as_mv.col = center_mv->as_mv.col >> 3;
|
||||
|
||||
// Work out the mid point for the search
|
||||
in_what = *(d->base_pre) + d->pre;
|
||||
bestaddress = in_what + (ref_row * d->pre_stride) + ref_col;
|
||||
in_what = xd->plane[0].pre[0].buf;
|
||||
bestaddress = in_what + (ref_row * xd->plane[0].pre[0].stride) + ref_col;
|
||||
|
||||
best_mv->as_mv.row = ref_row;
|
||||
best_mv->as_mv.col = ref_col;
|
||||
@@ -1666,11 +1670,12 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
int sad_per_bit, int distance,
|
||||
vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost,
|
||||
int *mvcost[2], int_mv *center_mv) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
uint8_t *in_what;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int mv_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
int mv_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *bestaddress;
|
||||
int_mv *best_mv = &d->bmi.as_mv[0];
|
||||
int_mv this_mv;
|
||||
@@ -1679,7 +1684,6 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
|
||||
uint8_t *check_here;
|
||||
unsigned int thissad;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
|
||||
int ref_row = ref_mv->as_mv.row;
|
||||
int ref_col = ref_mv->as_mv.col;
|
||||
@@ -1699,8 +1703,8 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
fcenter_mv.as_mv.col = center_mv->as_mv.col >> 3;
|
||||
|
||||
// Work out the mid point for the search
|
||||
in_what = *(d->base_pre) + d->pre;
|
||||
bestaddress = in_what + (ref_row * d->pre_stride) + ref_col;
|
||||
in_what = xd->plane[0].pre[0].buf;
|
||||
bestaddress = in_what + (ref_row * xd->plane[0].pre[0].stride) + ref_col;
|
||||
|
||||
best_mv->as_mv.row = ref_row;
|
||||
best_mv->as_mv.col = ref_col;
|
||||
@@ -1795,11 +1799,12 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
vp9_variance_fn_ptr_t *fn_ptr,
|
||||
int *mvjcost, int *mvcost[2],
|
||||
int_mv *center_mv) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
uint8_t *in_what;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int mv_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
int mv_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *bestaddress;
|
||||
int_mv *best_mv = &d->bmi.as_mv[0];
|
||||
int_mv this_mv;
|
||||
@@ -1808,7 +1813,6 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
|
||||
uint8_t *check_here;
|
||||
unsigned int thissad;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
|
||||
int ref_row = ref_mv->as_mv.row;
|
||||
int ref_col = ref_mv->as_mv.col;
|
||||
@@ -1829,8 +1833,8 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCKD *d, int_mv *ref_mv,
|
||||
fcenter_mv.as_mv.col = center_mv->as_mv.col >> 3;
|
||||
|
||||
// Work out the mid point for the search
|
||||
in_what = *(d->base_pre) + d->pre;
|
||||
bestaddress = in_what + (ref_row * d->pre_stride) + ref_col;
|
||||
in_what = xd->plane[0].pre[0].buf;
|
||||
bestaddress = in_what + (ref_row * xd->plane[0].pre[0].stride) + ref_col;
|
||||
|
||||
best_mv->as_mv.row = ref_row;
|
||||
best_mv->as_mv.col = ref_col;
|
||||
@@ -1948,21 +1952,21 @@ int vp9_refining_search_sad_c(MACROBLOCK *x, BLOCKD *d,
|
||||
int_mv *ref_mv, int error_per_bit,
|
||||
int search_range, vp9_variance_fn_ptr_t *fn_ptr,
|
||||
int *mvjcost, int *mvcost[2], int_mv *center_mv) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}};
|
||||
int i, j;
|
||||
int this_row_offset, this_col_offset;
|
||||
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
uint8_t *best_address = (uint8_t *)(*(d->base_pre) + d->pre +
|
||||
(ref_mv->as_mv.row * (d->pre_stride)) +
|
||||
ref_mv->as_mv.col);
|
||||
uint8_t *best_address = xd->plane[0].pre[0].buf +
|
||||
(ref_mv->as_mv.row * xd->plane[0].pre[0].stride) +
|
||||
ref_mv->as_mv.col;
|
||||
uint8_t *check_here;
|
||||
unsigned int thissad;
|
||||
int_mv this_mv;
|
||||
unsigned int bestsad = INT_MAX;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
int_mv fcenter_mv;
|
||||
|
||||
int *mvjsadcost = x->nmvjointsadcost;
|
||||
@@ -2026,21 +2030,21 @@ int vp9_refining_search_sadx4(MACROBLOCK *x, BLOCKD *d,
|
||||
int_mv *ref_mv, int error_per_bit,
|
||||
int search_range, vp9_variance_fn_ptr_t *fn_ptr,
|
||||
int *mvjcost, int *mvcost[2], int_mv *center_mv) {
|
||||
const MACROBLOCKD* const xd = &x->e_mbd;
|
||||
MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}};
|
||||
int i, j;
|
||||
int this_row_offset, this_col_offset;
|
||||
|
||||
int what_stride = x->plane[0].src.stride;
|
||||
int in_what_stride = d->pre_stride;
|
||||
int in_what_stride = xd->plane[0].pre[0].stride;
|
||||
uint8_t *what = x->plane[0].src.buf;
|
||||
uint8_t *best_address = (uint8_t *)(*(d->base_pre) + d->pre +
|
||||
(ref_mv->as_mv.row * (d->pre_stride)) +
|
||||
ref_mv->as_mv.col);
|
||||
uint8_t *best_address = xd->plane[0].pre[0].buf +
|
||||
(ref_mv->as_mv.row * xd->plane[0].pre[0].stride) +
|
||||
ref_mv->as_mv.col;
|
||||
uint8_t *check_here;
|
||||
unsigned int thissad;
|
||||
int_mv this_mv;
|
||||
unsigned int bestsad = INT_MAX;
|
||||
MACROBLOCKD *xd = &x->e_mbd;
|
||||
int_mv fcenter_mv;
|
||||
|
||||
int *mvjsadcost = x->nmvjointsadcost;
|
||||
|
Reference in New Issue
Block a user