| Index: source/libvpx/vp9/encoder/vp9_encodemv.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_encodemv.c (revision 254565)
|
| +++ source/libvpx/vp9/encoder/vp9_encodemv.c (working copy)
|
| @@ -224,35 +224,29 @@
|
| }
|
| }
|
|
|
| -void vp9_build_nmv_cost_table(int *mvjoint,
|
| - int *mvcost[2],
|
| - const nmv_context* const mvctx,
|
| - int usehp,
|
| - int mvc_flag_v,
|
| - int mvc_flag_h) {
|
| - vp9_clear_system_state();
|
| - vp9_cost_tokens(mvjoint, mvctx->joints, vp9_mv_joint_tree);
|
| - if (mvc_flag_v)
|
| - build_nmv_component_cost_table(mvcost[0], &mvctx->comps[0], usehp);
|
| - if (mvc_flag_h)
|
| - build_nmv_component_cost_table(mvcost[1], &mvctx->comps[1], usehp);
|
| +void vp9_build_nmv_cost_table(int *mvjoint, int *mvcost[2],
|
| + const nmv_context* ctx, int usehp) {
|
| + vp9_cost_tokens(mvjoint, ctx->joints, vp9_mv_joint_tree);
|
| + build_nmv_component_cost_table(mvcost[0], &ctx->comps[0], usehp);
|
| + build_nmv_component_cost_table(mvcost[1], &ctx->comps[1], usehp);
|
| }
|
|
|
| -static void inc_mvs(int_mv mv[2], int_mv ref[2], int is_compound,
|
| +static void inc_mvs(const int_mv mv[2], const MV ref[2], int is_compound,
|
| nmv_context_counts *counts) {
|
| int i;
|
| for (i = 0; i < 1 + is_compound; ++i) {
|
| - const MV diff = { mv[i].as_mv.row - ref[i].as_mv.row,
|
| - mv[i].as_mv.col - ref[i].as_mv.col };
|
| + const MV diff = { mv[i].as_mv.row - ref[i].row,
|
| + mv[i].as_mv.col - ref[i].col };
|
| vp9_inc_mv(&diff, counts);
|
| }
|
| }
|
|
|
| -void vp9_update_mv_count(VP9_COMP *cpi, MACROBLOCK *x, int_mv best_ref_mv[2]) {
|
| - MODE_INFO *mi = x->e_mbd.mi_8x8[0];
|
| - MB_MODE_INFO *const mbmi = &mi->mbmi;
|
| +void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd,
|
| + const MV best_ref_mv[2]) {
|
| + const MODE_INFO *mi = xd->mi_8x8[0];
|
| + const MB_MODE_INFO *const mbmi = &mi->mbmi;
|
| const int is_compound = has_second_ref(mbmi);
|
| - nmv_context_counts *counts = &cpi->common.counts.mv;
|
| + nmv_context_counts *counts = &cm->counts.mv;
|
|
|
| if (mbmi->sb_type < BLOCK_8X8) {
|
| const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type];
|
|
|