From d771bba27e2a2835594d337a61c04b3c131deee5 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Thu, 30 May 2013 15:47:59 -0700 Subject: [PATCH] Renaming 'motion_vector' to 'mv' for consistency. Change-Id: Ie869ea4992e26867caec46cb878fc86a646aeb9f --- vp9/common/vp9_blockd.h | 9 +++------ vp9/common/vp9_reconinter.c | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index ea330ac..05ffbef 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -243,12 +243,9 @@ struct scale_factors { int (*scale_value_x)(int val, const struct scale_factors *scale); int (*scale_value_y)(int val, const struct scale_factors *scale); void (*set_scaled_offsets)(struct scale_factors *scale, int row, int col); - int_mv32 (*scale_motion_vector_q3_to_q4)(const int_mv *src_mv, - const struct scale_factors *scale); - int32_t (*scale_motion_vector_component_q4)(int mv_q4, - int num, - int den, - int offset_q4); + int_mv32 (*scale_mv_q3_to_q4)(const int_mv *src_mv, + const struct scale_factors *scale); + int32_t (*scale_mv_component_q4)(int mv_q4, int num, int den, int offset_q4); convolve_fn_t predict[2][2][2]; // horiz, vert, avg }; diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index 2bc9c10..112d946 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -106,14 +106,14 @@ void vp9_setup_scale_factors_for_frame(struct scale_factors *scale, scale->scale_value_x = unscaled_value; scale->scale_value_y = unscaled_value; scale->set_scaled_offsets = set_offsets_without_scaling; - scale->scale_motion_vector_q3_to_q4 = mv_q3_to_q4_without_scaling; - scale->scale_motion_vector_component_q4 = mv_component_q4_without_scaling; + scale->scale_mv_q3_to_q4 = mv_q3_to_q4_without_scaling; + scale->scale_mv_component_q4 = mv_component_q4_without_scaling; } else { scale->scale_value_x = scale_value_x_with_scaling; scale->scale_value_y = scale_value_y_with_scaling; scale->set_scaled_offsets = set_offsets_with_scaling; - scale->scale_motion_vector_q3_to_q4 = mv_q3_to_q4_with_scaling; - scale->scale_motion_vector_component_q4 = mv_component_q4_with_scaling; + scale->scale_mv_q3_to_q4 = mv_q3_to_q4_with_scaling; + scale->scale_mv_component_q4 = mv_component_q4_with_scaling; } // TODO(agrange): Investigate the best choice of functions to use here @@ -287,7 +287,7 @@ void vp9_build_inter_predictor(const uint8_t *src, int src_stride, const struct scale_factors *scale, int w, int h, int weight, const struct subpix_fn_table *subpix) { - int_mv32 mv = scale->scale_motion_vector_q3_to_q4(mv_q3, scale); + int_mv32 mv = scale->scale_mv_q3_to_q4(mv_q3, scale); src += (mv.as_mv.row >> 4) * src_stride + (mv.as_mv.col >> 4); scale->predict[!!(mv.as_mv.col & 15)][!!(mv.as_mv.row & 15)][weight]( src, src_stride, dst, dst_stride, @@ -302,14 +302,14 @@ void vp9_build_inter_predictor_q4(const uint8_t *src, int src_stride, const struct scale_factors *scale, int w, int h, int weight, const struct subpix_fn_table *subpix) { - const int scaled_mv_row_q4 = - scale->scale_motion_vector_component_q4(mv_q4->as_mv.row, - scale->y_num, scale->y_den, - scale->y_offset_q4); - const int scaled_mv_col_q4 = - scale->scale_motion_vector_component_q4(mv_q4->as_mv.col, - scale->x_num, scale->x_den, - scale->x_offset_q4); + const int scaled_mv_row_q4 = scale->scale_mv_component_q4(mv_q4->as_mv.row, + scale->y_num, + scale->y_den, + scale->y_offset_q4); + const int scaled_mv_col_q4 = scale->scale_mv_component_q4(mv_q4->as_mv.col, + scale->x_num, + scale->x_den, + scale->x_offset_q4); const int subpel_x = scaled_mv_col_q4 & 15; const int subpel_y = scaled_mv_row_q4 & 15; -- 2.7.4