diff options
author | Scott LaVarnway <slavarnway@google.com> | 2010-08-12 16:25:43 -0400 |
---|---|---|
committer | Scott LaVarnway <slavarnway@google.com> | 2010-08-12 16:25:43 -0400 |
commit | 9c7a0090e0c8e4dda45570d273b9cd228b58e9d6 (patch) | |
tree | 53ffc762ba908ace52f0ba20f86e16a80e5e9d7e /vp8/common/reconinter.c | |
parent | f5615b6149037aa1c18703d6272c7273c43b5c6a (diff) | |
download | libvpx-9c7a0090e0c8e4dda45570d273b9cd228b58e9d6.tar libvpx-9c7a0090e0c8e4dda45570d273b9cd228b58e9d6.tar.gz libvpx-9c7a0090e0c8e4dda45570d273b9cd228b58e9d6.tar.bz2 libvpx-9c7a0090e0c8e4dda45570d273b9cd228b58e9d6.zip |
Removed unnecessary MB_MODE_INFO copies
These copies occurred for each macroblock in the encoder and decoder.
Thetemp MB_MODE_INFO mbmi was removed from MACROBLOCKD. As a result,
a large number compile errors had to be fixed.
Change-Id: I4cf0ffae3ce244f6db04a4c217d52dd256382cf3
Diffstat (limited to 'vp8/common/reconinter.c')
-rw-r--r-- | vp8/common/reconinter.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/vp8/common/reconinter.c b/vp8/common/reconinter.c index d17dc26af..f11995e24 100644 --- a/vp8/common/reconinter.c +++ b/vp8/common/reconinter.c @@ -210,7 +210,8 @@ void vp8_build_inter_predictors_mbuv(MACROBLOCKD *x) { int i; - if (x->mbmi.ref_frame != INTRA_FRAME && x->mbmi.mode != SPLITMV) + if (x->mode_info_context->mbmi.ref_frame != INTRA_FRAME && + x->mode_info_context->mbmi.mode != SPLITMV) { unsigned char *uptr, *vptr; unsigned char *upred_ptr = &x->predictor[256]; @@ -254,16 +255,18 @@ void vp8_build_inter_predictors_mbuv(MACROBLOCKD *x) } } - +//encoder only void vp8_build_inter_predictors_mby(MACROBLOCKD *x) { - if (x->mbmi.ref_frame != INTRA_FRAME && x->mbmi.mode != SPLITMV) + + if (x->mode_info_context->mbmi.ref_frame != INTRA_FRAME && + x->mode_info_context->mbmi.mode != SPLITMV) { unsigned char *ptr_base; unsigned char *ptr; unsigned char *pred_ptr = x->predictor; - int mv_row = x->mbmi.mv.as_mv.row; - int mv_col = x->mbmi.mv.as_mv.col; + int mv_row = x->mode_info_context->mbmi.mv.as_mv.row; + int mv_col = x->mode_info_context->mbmi.mv.as_mv.col; int pre_stride = x->block[0].pre_stride; ptr_base = x->pre.y_buffer; @@ -282,7 +285,7 @@ void vp8_build_inter_predictors_mby(MACROBLOCKD *x) { int i; - if (x->mbmi.partitioning < 3) + if (x->mode_info_context->mbmi.partitioning < 3) { for (i = 0; i < 4; i++) { @@ -313,7 +316,9 @@ void vp8_build_inter_predictors_mby(MACROBLOCKD *x) void vp8_build_inter_predictors_mb(MACROBLOCKD *x) { - if (x->mbmi.ref_frame != INTRA_FRAME && x->mbmi.mode != SPLITMV) + + if (x->mode_info_context->mbmi.ref_frame != INTRA_FRAME && + x->mode_info_context->mbmi.mode != SPLITMV) { int offset; unsigned char *ptr_base; @@ -323,8 +328,8 @@ void vp8_build_inter_predictors_mb(MACROBLOCKD *x) unsigned char *upred_ptr = &x->predictor[256]; unsigned char *vpred_ptr = &x->predictor[320]; - int mv_row = x->mbmi.mv.as_mv.row; - int mv_col = x->mbmi.mv.as_mv.col; + int mv_row = x->mode_info_context->mbmi.mv.as_mv.row; + int mv_col = x->mode_info_context->mbmi.mv.as_mv.col; int pre_stride = x->block[0].pre_stride; ptr_base = x->pre.y_buffer; @@ -361,7 +366,7 @@ void vp8_build_inter_predictors_mb(MACROBLOCKD *x) { int i; - if (x->mbmi.partitioning < 3) + if (x->mode_info_context->mbmi.partitioning < 3) { for (i = 0; i < 4; i++) { @@ -410,7 +415,7 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel) { int i, j; - if (x->mbmi.mode == SPLITMV) + if (x->mode_info_context->mbmi.mode == SPLITMV) { for (i = 0; i < 2; i++) { @@ -455,8 +460,8 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel) } else { - int mvrow = x->mbmi.mv.as_mv.row; - int mvcol = x->mbmi.mv.as_mv.col; + int mvrow = x->mode_info_context->mbmi.mv.as_mv.row; + int mvcol = x->mode_info_context->mbmi.mv.as_mv.col; if (mvrow < 0) mvrow -= 1; @@ -535,7 +540,7 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x) unsigned char *pred_ptr = x->predictor; unsigned char *dst_ptr = x->dst.y_buffer; - if (x->mbmi.mode != SPLITMV) + if (x->mode_info_context->mbmi.mode != SPLITMV) { int offset; unsigned char *ptr_base; @@ -547,8 +552,8 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x) unsigned char *udst_ptr = x->dst.u_buffer; unsigned char *vdst_ptr = x->dst.v_buffer; - int mv_row = x->mbmi.mv.as_mv.row; - int mv_col = x->mbmi.mv.as_mv.col; + int mv_row = x->mode_info_context->mbmi.mv.as_mv.row; + int mv_col = x->mode_info_context->mbmi.mv.as_mv.col; int pre_stride = x->dst.y_stride; //x->block[0].pre_stride; ptr_base = x->pre.y_buffer; @@ -587,7 +592,7 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x) //if sth is wrong, go back to what it is in build_inter_predictors_mb. int i; - if (x->mbmi.partitioning < 3) + if (x->mode_info_context->mbmi.partitioning < 3) { for (i = 0; i < 4; i++) { |