Commit 6d5ac8f2 authored by John Koleszar's avatar John Koleszar
Browse files

reconinter: remove unnecessary functions, params

Removes the redundant dst pointers from vp9_build_inter_predictors_sb{y,uv}
and the remaining mb specific functions.

Change-Id: I7b6bf439d9394b85ea79b4fe61a3ffc1025720da
parent f82c61b8
...@@ -575,14 +575,12 @@ static void build_inter_predictors(int plane, int block, ...@@ -575,14 +575,12 @@ static void build_inter_predictors(int plane, int block,
} }
} }
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
uint8_t *dst_y,
int dst_ystride,
int mb_row, int mb_row,
int mb_col, int mb_col,
BLOCK_SIZE_TYPE bsize) { BLOCK_SIZE_TYPE bsize) {
struct build_inter_predictors_args args = { struct build_inter_predictors_args args = {
xd, mb_col * 16, mb_row * 16, xd, mb_col * 16, mb_row * 16,
{dst_y, NULL, NULL}, {dst_ystride, 0, 0}, {xd->plane[0].dst.buf, NULL, NULL}, {xd->plane[0].dst.stride, 0, 0},
{{xd->pre.y_buffer, NULL, NULL}, {xd->second_pre.y_buffer, NULL, NULL}}, {{xd->pre.y_buffer, NULL, NULL}, {xd->second_pre.y_buffer, NULL, NULL}},
{{xd->pre.y_stride, 0, 0}, {xd->second_pre.y_stride, 0, 0}}, {{xd->pre.y_stride, 0, 0}, {xd->second_pre.y_stride, 0, 0}},
}; };
...@@ -595,15 +593,13 @@ void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, ...@@ -595,15 +593,13 @@ void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
foreach_predicted_block_in_plane(xd, bsize, 0, build_inter_predictors, &args); foreach_predicted_block_in_plane(xd, bsize, 0, build_inter_predictors, &args);
} }
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
uint8_t *dst_u,
uint8_t *dst_v,
int dst_uvstride,
int mb_row, int mb_row,
int mb_col, int mb_col,
BLOCK_SIZE_TYPE bsize) { BLOCK_SIZE_TYPE bsize) {
struct build_inter_predictors_args args = { struct build_inter_predictors_args args = {
xd, mb_col * 16, mb_row * 16, xd, mb_col * 16, mb_row * 16,
{NULL, dst_u, dst_v}, {0, dst_uvstride, dst_uvstride}, {NULL, xd->plane[1].dst.buf, xd->plane[2].dst.buf},
{0, xd->plane[1].dst.stride, xd->plane[1].dst.stride},
{{NULL, xd->pre.u_buffer, xd->pre.v_buffer}, {{NULL, xd->pre.u_buffer, xd->pre.v_buffer},
{NULL, xd->second_pre.u_buffer, xd->second_pre.v_buffer}}, {NULL, xd->second_pre.u_buffer, xd->second_pre.v_buffer}},
{{0, xd->pre.uv_stride, xd->pre.uv_stride}, {{0, xd->pre.uv_stride, xd->pre.uv_stride},
...@@ -614,14 +610,17 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, ...@@ -614,14 +610,17 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, void vp9_build_inter_predictors_sb(MACROBLOCKD *xd,
int mb_row, int mb_col, int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize) { BLOCK_SIZE_TYPE bsize) {
#if CONFIG_COMP_INTERINTRA_PRED
uint8_t *const y = xd->plane[0].dst.buf; uint8_t *const y = xd->plane[0].dst.buf;
uint8_t *const u = xd->plane[1].dst.buf; uint8_t *const u = xd->plane[1].dst.buf;
uint8_t *const v = xd->plane[2].dst.buf; uint8_t *const v = xd->plane[2].dst.buf;
const int y_stride = xd->plane[0].dst.stride; const int y_stride = xd->plane[0].dst.stride;
const int uv_stride = xd->plane[1].dst.stride; const int uv_stride = xd->plane[1].dst.stride;
#endif
vp9_build_inter_predictors_sby(xd, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sbuv(xd, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sby(xd, y, y_stride, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sbuv(xd, u, v, uv_stride, mb_row, mb_col, bsize);
#if CONFIG_COMP_INTERINTRA_PRED #if CONFIG_COMP_INTERINTRA_PRED
if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) { if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
if (bsize == BLOCK_SIZE_SB32X32) if (bsize == BLOCK_SIZE_SB32X32)
...@@ -1090,11 +1089,12 @@ static void build_inter_predictors_sby_w(MACROBLOCKD *x, ...@@ -1090,11 +1089,12 @@ static void build_inter_predictors_sby_w(MACROBLOCKD *x,
} }
void vp9_build_inter_predictors_sby(MACROBLOCKD *x, void vp9_build_inter_predictors_sby(MACROBLOCKD *x,
uint8_t *dst_y, int mb_row,
int dst_ystride, int mb_col,
int mb_row, BLOCK_SIZE_TYPE bsize) {
int mb_col, uint8_t * const dst_y = x->plane[0].dst.buf;
BLOCK_SIZE_TYPE bsize) { const int dst_ystride = x->plane[0].dst.stride;
int weight = get_implicit_compoundinter_weight(x, mb_row, mb_col); int weight = get_implicit_compoundinter_weight(x, mb_row, mb_col);
build_inter_predictors_sby_w(x, dst_y, dst_ystride, weight, build_inter_predictors_sby_w(x, dst_y, dst_ystride, weight,
mb_row, mb_col, bsize); mb_row, mb_col, bsize);
...@@ -1164,12 +1164,13 @@ static void build_inter_predictors_sbuv_w(MACROBLOCKD *x, ...@@ -1164,12 +1164,13 @@ static void build_inter_predictors_sbuv_w(MACROBLOCKD *x,
} }
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
uint8_t *dst_u,
uint8_t *dst_v,
int dst_uvstride,
int mb_row, int mb_row,
int mb_col, int mb_col,
BLOCK_SIZE_TYPE bsize) { BLOCK_SIZE_TYPE bsize) {
uint8_t *const dst_u = xd->plane[1].dst.buf;
uint8_t *const dst_v = xd->plane[2].dst.buf;
const int dst_uvstride = xd->plane[1].dst.stride;
#ifdef USE_IMPLICIT_WEIGHT_UV #ifdef USE_IMPLICIT_WEIGHT_UV
int weight = get_implicit_compoundinter_weight(xd, mb_row, mb_col); int weight = get_implicit_compoundinter_weight(xd, mb_row, mb_col);
#else #else
...@@ -1182,18 +1183,21 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, ...@@ -1182,18 +1183,21 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb, void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col, int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize) { BLOCK_SIZE_TYPE bsize) {
#if CONFIG_COMP_INTERINTRA_PRED
uint8_t *const y = mb->plane[0].dst.buf; uint8_t *const y = mb->plane[0].dst.buf;
uint8_t *const u = mb->plane[1].dst.buf; uint8_t *const u = mb->plane[1].dst.buf;
uint8_t *const v = mb->plane[2].dst.buf; uint8_t *const v = mb->plane[2].dst.buf;
const int y_stride = mb->plane[0].dst.stride; const int y_stride = mb->plane[0].dst.stride;
const int uv_stride = mb->plane[1].dst.stride; const int uv_stride = mb->plane[1].dst.stride;
#endif
vp9_build_inter_predictors_sby(mb, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sbuv(mb, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sby(mb, y, y_stride, mb_row, mb_col, bsize);
vp9_build_inter_predictors_sbuv(mb, u, v, uv_stride, mb_row, mb_col, bsize);
#if CONFIG_COMP_INTERINTRA_PRED #if CONFIG_COMP_INTERINTRA_PRED
if (mb->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) { if (mb->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
if (bsize == BLOCK_SIZE_SB32X32) if (bsize == BLOCK_SIZE_SB32X32)
vp9_build_interintra_32x32_predictors_sb(mb, y, u, v, vp9_build_interintra_32x32_predictors_sb(mb, y, u, v,
y_stride, uv_stride); y_stride, uv_stride);
else else
vp9_build_interintra_64x64_predictors_sb(mb, y, u, v, vp9_build_interintra_64x64_predictors_sb(mb, y, u, v,
...@@ -1223,20 +1227,9 @@ static int mi_mv_pred_col(MACROBLOCKD *mb, int off, int idx) { ...@@ -1223,20 +1227,9 @@ static int mi_mv_pred_col(MACROBLOCKD *mb, int off, int idx) {
return round_mv_comp(temp); return round_mv_comp(temp);
} }
void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
int mb_row,
int mb_col) {
vp9_build_inter_predictors_sb(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
}
/*encoder only*/ /*encoder only*/
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd, void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_col) { int mb_row, int mb_col) {
uint8_t *const u = xd->plane[1].dst.buf; vp9_build_inter_predictors_sbuv(xd, mb_row, mb_col,
uint8_t *const v = xd->plane[2].dst.buf;
const int uv_stride = xd->plane[1].dst.stride;
vp9_build_inter_predictors_sbuv(xd, u, v, uv_stride, mb_row, mb_col,
BLOCK_SIZE_MB16X16); BLOCK_SIZE_MB16X16);
} }
...@@ -17,31 +17,19 @@ ...@@ -17,31 +17,19 @@
struct subpix_fn_table; struct subpix_fn_table;
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
uint8_t *dst_y,
int dst_ystride,
int mb_row, int mb_row,
int mb_col, int mb_col,
BLOCK_SIZE_TYPE bsize); BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
uint8_t *dst_u,
uint8_t *dst_v,
int dst_uvstride,
int mb_row, int mb_row,
int mb_col, int mb_col,
BLOCK_SIZE_TYPE bsize); BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb, void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col, int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize); BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
int mb_row,
int mb_col);
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row,
int mb_col);
void vp9_setup_interp_filters(MACROBLOCKD *xd, void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE filter, INTERPOLATIONFILTERTYPE filter,
VP9_COMMON *cm); VP9_COMMON *cm);
......
...@@ -717,7 +717,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -717,7 +717,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd->mode_info_context->mbmi.mode, tx_size, xd->mode_info_context->mbmi.mode, tx_size,
xd->mode_info_context->mbmi.interp_filter); xd->mode_info_context->mbmi.interp_filter);
#endif #endif
vp9_build_inter_predictors_mb(xd, mb_row, mb_col); vp9_build_inter_predictors_sb(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
} }
if (xd->mode_info_context->mbmi.mb_skip_coeff) { if (xd->mode_info_context->mbmi.mb_skip_coeff) {
......
...@@ -904,7 +904,7 @@ void vp9_encode_inter16x16(VP9_COMMON *const cm, MACROBLOCK *x, ...@@ -904,7 +904,7 @@ void vp9_encode_inter16x16(VP9_COMMON *const cm, MACROBLOCK *x,
int mb_row, int mb_col) { int mb_row, int mb_col) {
MACROBLOCKD *const xd = &x->e_mbd; MACROBLOCKD *const xd = &x->e_mbd;
vp9_build_inter_predictors_mb(xd, mb_row, mb_col); vp9_build_inter_predictors_sb(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
subtract_mb(x); subtract_mb(x);
vp9_fidct_mb(cm, x); vp9_fidct_mb(cm, x);
vp9_recon_sb(xd, BLOCK_SIZE_MB16X16); vp9_recon_sb(xd, BLOCK_SIZE_MB16X16);
...@@ -914,9 +914,7 @@ void vp9_encode_inter16x16(VP9_COMMON *const cm, MACROBLOCK *x, ...@@ -914,9 +914,7 @@ void vp9_encode_inter16x16(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_encode_inter16x16y(MACROBLOCK *x, int mb_row, int mb_col) { void vp9_encode_inter16x16y(MACROBLOCK *x, int mb_row, int mb_col) {
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
vp9_build_inter_predictors_sby(xd, xd->plane[0].dst.buf, vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
xd->plane[0].dst.stride,
mb_row, mb_col, BLOCK_SIZE_MB16X16);
vp9_subtract_sby_s_c(x->src_diff, x->src.y_buffer, x->src.y_stride, vp9_subtract_sby_s_c(x->src_diff, x->src.y_buffer, x->src.y_stride,
xd->plane[0].dst.buf, xd->plane[0].dst.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride,
BLOCK_SIZE_MB16X16); BLOCK_SIZE_MB16X16);
......
...@@ -71,9 +71,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, ...@@ -71,9 +71,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
} }
vp9_set_mbmode_and_mvs(x, NEWMV, dst_mv); vp9_set_mbmode_and_mvs(x, NEWMV, dst_mv);
vp9_build_inter_predictors_sby(xd, xd->plane[0].dst.buf, vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
xd->plane[0].dst.stride,
mb_row, mb_col, BLOCK_SIZE_MB16X16);
best_err = vp9_sad16x16(x->src.y_buffer, x->src.y_stride, best_err = vp9_sad16x16(x->src.y_buffer, x->src.y_stride,
xd->plane[0].dst.buf, xd->plane[0].dst.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride,
INT_MAX); INT_MAX);
......
...@@ -3757,7 +3757,8 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -3757,7 +3757,8 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (tmp_rd < best_yrd) { if (tmp_rd < best_yrd) {
int uv_skippable; int uv_skippable;
vp9_build_inter4x4_predictors_mbuv(&x->e_mbd, mb_row, mb_col); vp9_build_inter_predictors_sbuv(&x->e_mbd, mb_row, mb_col,
BLOCK_SIZE_MB16X16);
vp9_subtract_sbuv_s_c(x->src_diff, vp9_subtract_sbuv_s_c(x->src_diff,
x->src.u_buffer, x->src.u_buffer,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment