ref: 6d5ac8f2e1ad259b66928e854904c2c2e6656084
parent: f82c61b8862f258bde802dd2a509a8718a718a6b
author: John Koleszar <[email protected]>
date: Fri Apr 19 06:45:50 EDT 2013
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
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -575,14 +575,12 @@
}
}
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
- uint8_t *dst_y,
- int dst_ystride,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize) {
struct build_inter_predictors_args args = {
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_stride, 0, 0}, {xd->second_pre.y_stride, 0, 0}},
};
@@ -595,15 +593,13 @@
foreach_predicted_block_in_plane(xd, bsize, 0, build_inter_predictors, &args);
}
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
- uint8_t *dst_u,
- uint8_t *dst_v,
- int dst_uvstride,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize) {
struct build_inter_predictors_args args = {
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->second_pre.u_buffer, xd->second_pre.v_buffer}},
{{0, xd->pre.uv_stride, xd->pre.uv_stride},
@@ -614,14 +610,17 @@
void vp9_build_inter_predictors_sb(MACROBLOCKD *xd,
int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize) {
+#if CONFIG_COMP_INTERINTRA_PRED
uint8_t *const y = xd->plane[0].dst.buf;
uint8_t *const u = xd->plane[1].dst.buf;
uint8_t *const v = xd->plane[2].dst.buf;
const int y_stride = xd->plane[0].dst.stride;
const int uv_stride = xd->plane[1].dst.stride;
+#endif
- 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);
+ vp9_build_inter_predictors_sby(xd, mb_row, mb_col, bsize);
+ vp9_build_inter_predictors_sbuv(xd, mb_row, mb_col, bsize);
+
#if CONFIG_COMP_INTERINTRA_PRED
if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
if (bsize == BLOCK_SIZE_SB32X32)
@@ -1090,11 +1089,12 @@
}
void vp9_build_inter_predictors_sby(MACROBLOCKD *x,
- uint8_t *dst_y,
- int dst_ystride,
- int mb_row,
- int mb_col,
- BLOCK_SIZE_TYPE bsize) {
+ int mb_row,
+ int mb_col,
+ BLOCK_SIZE_TYPE bsize) {
+ uint8_t * const dst_y = x->plane[0].dst.buf;
+ const int dst_ystride = x->plane[0].dst.stride;
+
int weight = get_implicit_compoundinter_weight(x, mb_row, mb_col);
build_inter_predictors_sby_w(x, dst_y, dst_ystride, weight,
mb_row, mb_col, bsize);
@@ -1164,12 +1164,13 @@
}
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
- uint8_t *dst_u,
- uint8_t *dst_v,
- int dst_uvstride,
int mb_row,
int mb_col,
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
int weight = get_implicit_compoundinter_weight(xd, mb_row, mb_col);
#else
@@ -1182,18 +1183,21 @@
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize) {
+#if CONFIG_COMP_INTERINTRA_PRED
uint8_t *const y = mb->plane[0].dst.buf;
uint8_t *const u = mb->plane[1].dst.buf;
uint8_t *const v = mb->plane[2].dst.buf;
const int y_stride = mb->plane[0].dst.stride;
const int uv_stride = mb->plane[1].dst.stride;
+#endif
- 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);
+ vp9_build_inter_predictors_sby(mb, mb_row, mb_col, bsize);
+ vp9_build_inter_predictors_sbuv(mb, mb_row, mb_col, bsize);
+
#if CONFIG_COMP_INTERINTRA_PRED
if (mb->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
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);
else
vp9_build_interintra_64x64_predictors_sb(mb, y, u, v,
@@ -1223,20 +1227,9 @@
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*/
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_col) {
- uint8_t *const u = xd->plane[1].dst.buf;
- 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,
+ vp9_build_inter_predictors_sbuv(xd, mb_row, mb_col,
BLOCK_SIZE_MB16X16);
}
--- a/vp9/common/vp9_reconinter.h
+++ b/vp9/common/vp9_reconinter.h
@@ -17,30 +17,18 @@
struct subpix_fn_table;
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
- uint8_t *dst_y,
- int dst_ystride,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
- uint8_t *dst_u,
- uint8_t *dst_v,
- int dst_uvstride,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize);
+
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col,
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,
INTERPOLATIONFILTERTYPE filter,
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -717,7 +717,7 @@
xd->mode_info_context->mbmi.mode, tx_size,
xd->mode_info_context->mbmi.interp_filter);
#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) {
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -904,7 +904,7 @@
int mb_row, int mb_col) {
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);
vp9_fidct_mb(cm, x);
vp9_recon_sb(xd, BLOCK_SIZE_MB16X16);
@@ -914,9 +914,7 @@
void vp9_encode_inter16x16y(MACROBLOCK *x, int mb_row, int mb_col) {
MACROBLOCKD *xd = &x->e_mbd;
- vp9_build_inter_predictors_sby(xd, xd->plane[0].dst.buf,
- xd->plane[0].dst.stride,
- mb_row, mb_col, BLOCK_SIZE_MB16X16);
+ vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
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,
BLOCK_SIZE_MB16X16);
--- a/vp9/encoder/vp9_mbgraph.c
+++ b/vp9/encoder/vp9_mbgraph.c
@@ -71,9 +71,7 @@
}
vp9_set_mbmode_and_mvs(x, NEWMV, dst_mv);
- vp9_build_inter_predictors_sby(xd, xd->plane[0].dst.buf,
- xd->plane[0].dst.stride,
- mb_row, mb_col, BLOCK_SIZE_MB16X16);
+ vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
best_err = vp9_sad16x16(x->src.y_buffer, x->src.y_stride,
xd->plane[0].dst.buf, xd->plane[0].dst.stride,
INT_MAX);
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3757,7 +3757,8 @@
if (tmp_rd < best_yrd) {
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,
x->src.u_buffer,