#include "vp8/common/common.h"
#include "encodemv.h"
#include "vp8/common/entropymode.h"
#include "vp8/common/systemdependent.h"
#include "vpx_ports/system_state.h"
#include <math.h>
static void encode_mvcomponent(vp8_writer *const w, const int v,
const struct mv_context *mvc) { … }
#if 0
static int max_mv_r = 0;
static int max_mv_c = 0;
#endif
void vp8_encode_motion_vector(vp8_writer *w, const MV *mv,
const MV_CONTEXT *mvc) { … }
static unsigned int cost_mvcomponent(const int v,
const struct mv_context *mvc) { … }
void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc,
int mvc_flag[2]) { … }
#define MV_PROB_UPDATE_CORRECTION …
static void calc_prob(vp8_prob *p, const unsigned int ct[2]) { … }
static void update(vp8_writer *const w, const unsigned int ct[2],
vp8_prob *const cur_p, const vp8_prob new_p,
const vp8_prob update_p, int *updated) { … }
static void write_component_probs(vp8_writer *const w,
struct mv_context *cur_mvc,
const struct mv_context *default_mvc_,
const struct mv_context *update_mvc,
const unsigned int events[MVvals],
unsigned int rc, int *updated) { … }
void vp8_write_mvprobs(VP8_COMP *cpi) { … }