Commit 78808ad9 authored by Deb Mukherjee's avatar Deb Mukherjee

Merge of the newmventropy experiment

Removes the old mv encoding code.

Change-Id: I1026d48cc5ac15ccb776f98463e929254c3dc7da
parent 12c1b180
......@@ -224,7 +224,6 @@ EXPERIMENT_LIST="
switchable_interp
newbestrefmv
new_mvref
newmventropy
tx_select
"
CONFIG_LIST="
......
......@@ -137,8 +137,8 @@ typedef enum {
typedef enum {
DCT_DCT = 0, // DCT in both horizontal and vertical
ADST_DCT = 1, // ADST in horizontal, DCT in vertical
DCT_ADST = 2, // DCT in horizontal, ADST in vertical
ADST_DCT = 1, // ADST in vertical, DCT in horizontal
DCT_ADST = 2, // DCT in vertical, ADST in horizontal
ADST_ADST = 3 // ADST in both directions
} TX_TYPE;
......
......@@ -14,8 +14,6 @@
//#define MV_COUNT_TESTING
#if CONFIG_NEWMVENTROPY
#define MV_COUNT_SAT 16
#define MV_MAX_UPDATE_FACTOR 160
......@@ -450,413 +448,13 @@ void vp8_adapt_nmv_probs(VP8_COMMON *cm, int usehp) {
}
}
#else /* CONFIG_NEWMVENTROPY */
#define MV_COUNT_SAT 16
#define MV_MAX_UPDATE_FACTOR 128
const MV_CONTEXT_HP vp8_mv_update_probs_hp[2] = {
{{
237,
246,
253, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
254, 254, 254, 254, 254, 250, 250, 252, 254, 254, 254
}
},
{{
231,
243,
245, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
254, 254, 254, 254, 254, 251, 251, 254, 254, 254, 254
}
}
};
const MV_CONTEXT_HP vp8_default_mv_context_hp[2] = {
{{
/* row */
162, /* is short */
128, /* sign */
220, 204, 180, 192, 192, 119, 192, 192, 180, 140, 192, 192, 224, 224, 224, /* short tree */
128, 129, 132, 75, 145, 178, 206, 239, 254, 254, 254 /* long bits */
}
},
{{
/* same for column */
164, /* is short */
128,
220, 204, 180, 192, 192, 119, 192, 192, 180, 140, 192, 192, 224, 224, 224, /* short tree */
128, 130, 130, 74, 148, 180, 203, 236, 254, 254, 254 /* long bits */
}
}
};
const MV_CONTEXT vp8_mv_update_probs[2] = {
{{
237,
246,
253, 253, 254, 254, 254, 254, 254,
254, 254, 254, 254, 254, 250, 250, 252, 254, 254
}
},
{{
231,
243,
245, 253, 254, 254, 254, 254, 254,
254, 254, 254, 254, 254, 251, 251, 254, 254, 254
}
}
};
const MV_CONTEXT vp8_default_mv_context[2] = {
{{
/* row */
162, /* is short */
128, /* sign */
225, 146, 172, 147, 214, 39, 156, /* short tree */
128, 129, 132, 75, 145, 178, 206, 239, 254, 254 /* long bits */
}
},
{{
/* same for column */
164, /* is short */
128,
204, 170, 119, 235, 140, 230, 228,
128, 130, 130, 74, 148, 180, 203, 236, 254, 254 /* long bits */
}
}
};
const vp8_tree_index vp8_small_mvtree_hp [30] = {
2, 16,
4, 10,
6, 8,
-0, -1,
-2, -3,
12, 14,
-4, -5,
-6, -7,
18, 24,
20, 22,
-8, -9,
-10, -11,
26, 28,
-12, -13,
-14, -15
};
struct vp8_token_struct vp8_small_mvencodings_hp [16];
const vp8_tree_index vp8_small_mvtree [14] = {
2, 8,
4, 6,
-0, -1,
-2, -3,
10, 12,
-4, -5,
-6, -7
};
struct vp8_token_struct vp8_small_mvencodings [8];
__inline static void calc_prob(vp8_prob *p, const unsigned int ct[2], int pbits) {
const unsigned int tot = ct[0] + ct[1];
if (tot) {
const vp8_prob x = ((ct[0] * 255) / tot) & -(1 << (8 - pbits));
*p = x ? x : 1;
} else {
*p = 128;
}
}
static void compute_component_probs(
const unsigned int events [MVvals],
vp8_prob Pnew [MVPcount],
unsigned int is_short_ct[2],
unsigned int sign_ct[2],
unsigned int bit_ct [mvlong_width] [2],
unsigned int short_ct [mvnum_short],
unsigned int short_bct [mvnum_short - 1] [2]
) {
is_short_ct[0] = is_short_ct[1] = 0;
sign_ct[0] = sign_ct[1] = 0;
vpx_memset(bit_ct, 0, sizeof(unsigned int)*mvlong_width * 2);
vpx_memset(short_ct, 0, sizeof(unsigned int)*mvnum_short);
vpx_memset(short_bct, 0, sizeof(unsigned int) * (mvnum_short - 1) * 2);
{
const int c = events [mv_max];
is_short_ct [0] += c; // Short vector
short_ct [0] += c; // Magnitude distribution
}
{
int j = 1;
do {
const int c1 = events [mv_max + j]; // positive
const int c2 = events [mv_max - j]; // negative
const int c = c1 + c2;
int a = j;
sign_ct [0] += c1;
sign_ct [1] += c2;
if (a < mvnum_short) {
is_short_ct [0] += c; // Short vector
short_ct [a] += c; // Magnitude distribution
} else {
int k = mvlong_width - 1;
is_short_ct [1] += c; // Long vector
do
bit_ct [k] [(a >> k) & 1] += c;
while (--k >= 0);
}
} while (++j <= mv_max);
}
calc_prob(Pnew + mvpis_short, is_short_ct, 8);
calc_prob(Pnew + MVPsign, sign_ct, 8);
{
vp8_prob p [mvnum_short - 1]; /* actually only need branch ct */
int j = 0;
vp8_tree_probs_from_distribution(
mvnum_short, vp8_small_mvencodings, vp8_small_mvtree,
p, short_bct, short_ct,
256, 1
);
do
calc_prob(Pnew + MVPshort + j, short_bct[j], 8);
while (++j < mvnum_short - 1);
}
{
int j = 0;
do
calc_prob(Pnew + MVPbits + j, bit_ct[j], 8);
while (++j < mvlong_width);
}
}
static void compute_component_probs_hp(
const unsigned int events [MVvals_hp],
vp8_prob Pnew [MVPcount_hp],
unsigned int is_short_ct[2],
unsigned int sign_ct[2],
unsigned int bit_ct [mvlong_width_hp] [2],
unsigned int short_ct [mvnum_short_hp],
unsigned int short_bct [mvnum_short_hp - 1] [2]
) {
is_short_ct[0] = is_short_ct[1] = 0;
sign_ct[0] = sign_ct[1] = 0;
vpx_memset(bit_ct, 0, sizeof(unsigned int)*mvlong_width_hp * 2);
vpx_memset(short_ct, 0, sizeof(unsigned int)*mvnum_short_hp);
vpx_memset(short_bct, 0, sizeof(unsigned int) * (mvnum_short_hp - 1) * 2);
{
const int c = events [mv_max_hp];
is_short_ct [0] += c; // Short vector
short_ct [0] += c; // Magnitude distribution
}
{
int j = 1;
do {
const int c1 = events [mv_max_hp + j]; // positive
const int c2 = events [mv_max_hp - j]; // negative
const int c = c1 + c2;
int a = j;
sign_ct [0] += c1;
sign_ct [1] += c2;
if (a < mvnum_short_hp) {
is_short_ct [0] += c; // Short vector
short_ct [a] += c; // Magnitude distribution
} else {
int k = mvlong_width_hp - 1;
is_short_ct [1] += c; // Long vector
do
bit_ct [k] [(a >> k) & 1] += c;
while (--k >= 0);
}
} while (++j <= mv_max_hp);
}
calc_prob(Pnew + mvpis_short_hp, is_short_ct, 8);
calc_prob(Pnew + MVPsign_hp, sign_ct, 8);
{
vp8_prob p [mvnum_short_hp - 1]; /* actually only need branch ct */
int j = 0;
vp8_tree_probs_from_distribution(
mvnum_short_hp, vp8_small_mvencodings_hp, vp8_small_mvtree_hp,
p, short_bct, short_ct,
256, 1
);
do
calc_prob(Pnew + MVPshort_hp + j, short_bct[j], 8);
while (++j < mvnum_short_hp - 1);
}
{
int j = 0;
do
calc_prob(Pnew + MVPbits_hp + j, bit_ct[j], 8);
while (++j < mvlong_width_hp);
}
}
void vp8_adapt_mv_probs(VP8_COMMON *cm) {
int i, t, count, factor;
#ifdef MV_COUNT_TESTING
printf("static const unsigned int\nMVcount[2][MVvals]={\n");
for (i = 0; i < 2; ++i) {
printf(" { ");
for (t = 0; t < MVvals; t++) {
printf("%d, ", cm->fc.MVcount[i][t]);
if (t % 16 == 15 && t != MVvals - 1) printf("\n ");
}
printf("},\n");
}
printf("};\n");
printf("static const unsigned int\nMVcount_hp[2][MVvals_hp]={\n");
for (i = 0; i < 2; ++i) {
printf(" { ");
for (t = 0; t < MVvals_hp; t++) {
printf("%d, ", cm->fc.MVcount_hp[i][t]);
if (t % 16 == 15 && t != MVvals_hp - 1) printf("\n ");
}
printf("},\n");
}
printf("};\n");
#endif /* MV_COUNT_TESTING */
for (i = 0; i < 2; ++i) {
int prob;
unsigned int is_short_ct[2];
unsigned int sign_ct[2];
unsigned int bit_ct [mvlong_width] [2];
unsigned int short_ct [mvnum_short];
unsigned int short_bct [mvnum_short - 1] [2];
vp8_prob Pnew [MVPcount];
compute_component_probs(cm->fc.MVcount[i], Pnew,
is_short_ct, sign_ct,
bit_ct, short_ct, short_bct);
count = is_short_ct[0] + is_short_ct[1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc[i].prob[mvpis_short] * (256 - factor) +
(int)Pnew[mvpis_short] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc[i].prob[mvpis_short] = 1;
else if (prob > 255) cm->fc.mvc[i].prob[mvpis_short] = 255;
else cm->fc.mvc[i].prob[mvpis_short] = prob;
count = sign_ct[0] + sign_ct[1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc[i].prob[MVPsign] * (256 - factor) +
(int)Pnew[MVPsign] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc[i].prob[MVPsign] = 1;
else if (prob > 255) cm->fc.mvc[i].prob[MVPsign] = 255;
else cm->fc.mvc[i].prob[MVPsign] = prob;
for (t = 0; t < mvnum_short - 1; ++t) {
count = short_bct[t][0] + short_bct[t][1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc[i].prob[MVPshort + t] * (256 - factor) +
(int)Pnew[MVPshort + t] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc[i].prob[MVPshort + t] = 1;
else if (prob > 255) cm->fc.mvc[i].prob[MVPshort + t] = 255;
else cm->fc.mvc[i].prob[MVPshort + t] = prob;
}
for (t = 0; t < mvlong_width; ++t) {
count = bit_ct[t][0] + bit_ct[t][1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc[i].prob[MVPbits + t] * (256 - factor) +
(int)Pnew[MVPbits + t] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc[i].prob[MVPbits + t] = 1;
else if (prob > 255) cm->fc.mvc[i].prob[MVPbits + t] = 255;
else cm->fc.mvc[i].prob[MVPbits + t] = prob;
}
}
for (i = 0; i < 2; ++i) {
int prob;
unsigned int is_short_ct[2];
unsigned int sign_ct[2];
unsigned int bit_ct [mvlong_width_hp] [2];
unsigned int short_ct [mvnum_short_hp];
unsigned int short_bct [mvnum_short_hp - 1] [2];
vp8_prob Pnew [MVPcount_hp];
compute_component_probs_hp(cm->fc.MVcount_hp[i], Pnew,
is_short_ct, sign_ct,
bit_ct, short_ct, short_bct);
count = is_short_ct[0] + is_short_ct[1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc_hp[i].prob[mvpis_short_hp] * (256 - factor) +
(int)Pnew[mvpis_short_hp] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc_hp[i].prob[mvpis_short_hp] = 1;
else if (prob > 255) cm->fc.mvc_hp[i].prob[mvpis_short_hp] = 255;
else cm->fc.mvc_hp[i].prob[mvpis_short_hp] = prob;
count = sign_ct[0] + sign_ct[1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc_hp[i].prob[MVPsign_hp] * (256 - factor) +
(int)Pnew[MVPsign_hp] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc_hp[i].prob[MVPsign_hp] = 1;
else if (prob > 255) cm->fc.mvc_hp[i].prob[MVPsign_hp] = 255;
else cm->fc.mvc_hp[i].prob[MVPsign_hp] = prob;
for (t = 0; t < mvnum_short_hp - 1; ++t) {
count = short_bct[t][0] + short_bct[t][1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc_hp[i].prob[MVPshort_hp + t] * (256 - factor) +
(int)Pnew[MVPshort_hp + t] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc_hp[i].prob[MVPshort_hp + t] = 1;
else if (prob > 255) cm->fc.mvc_hp[i].prob[MVPshort_hp + t] = 255;
else cm->fc.mvc_hp[i].prob[MVPshort_hp + t] = prob;
}
for (t = 0; t < mvlong_width_hp; ++t) {
count = bit_ct[t][0] + bit_ct[t][1];
count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count;
factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT);
prob = ((int)cm->fc.pre_mvc_hp[i].prob[MVPbits_hp + t] * (256 - factor) +
(int)Pnew[MVPbits_hp + t] * factor + 128) >> 8;
if (prob <= 0) cm->fc.mvc_hp[i].prob[MVPbits_hp + t] = 1;
else if (prob > 255) cm->fc.mvc_hp[i].prob[MVPbits_hp + t] = 255;
else cm->fc.mvc_hp[i].prob[MVPbits_hp + t] = prob;
}
}
}
#endif /* CONFIG_NEWMVENTROPY */
void vp8_entropy_mv_init() {
#if CONFIG_NEWMVENTROPY
vp8_tokens_from_tree(vp8_mv_joint_encodings, vp8_mv_joint_tree);
vp8_tokens_from_tree(vp8_mv_class_encodings, vp8_mv_class_tree);
vp8_tokens_from_tree(vp8_mv_class0_encodings, vp8_mv_class0_tree);
vp8_tokens_from_tree(vp8_mv_fp_encodings, vp8_mv_fp_tree);
#else
vp8_tokens_from_tree(vp8_small_mvencodings, vp8_small_mvtree);
vp8_tokens_from_tree(vp8_small_mvencodings_hp, vp8_small_mvtree_hp);
#endif
}
void vp8_init_mv_probs(VP8_COMMON *cm) {
#if CONFIG_NEWMVENTROPY
vpx_memcpy(&cm->fc.nmvc, &vp8_default_nmv_context, sizeof(nmv_context));
#else
vpx_memcpy(cm->fc.mvc,
vp8_default_mv_context, sizeof(vp8_default_mv_context));
vpx_memcpy(cm->fc.mvc_hp,
vp8_default_mv_context_hp, sizeof(vp8_default_mv_context_hp));
#endif
}
......@@ -22,7 +22,6 @@ void vp8_entropy_mv_init();
void vp8_init_mv_probs(struct VP8Common *cm);
void vp8_adapt_mv_probs(struct VP8Common *cm);
#if CONFIG_NEWMVENTROPY
void vp8_adapt_nmv_probs(struct VP8Common *cm, int usehp);
void vp8_lower_mv_precision(MV *mv);
int vp8_use_nmv_hp(const MV *ref);
......@@ -129,65 +128,4 @@ void vp8_counts_to_nmv_context(
unsigned int (*branch_ct_class0_hp)[2],
unsigned int (*branch_ct_hp)[2]);
#else /* CONFIG_NEWMVENTROPY */
enum {
mv_max = 1023, /* max absolute value of a MV component */
MVvals = (2 * mv_max) + 1, /* # possible values "" */
mvlong_width = 10, /* Large MVs have 9 bit magnitudes */
mvnum_short = 8, /* magnitudes 0 through 7 */
mvnum_short_bits = 3, /* number of bits for short mvs */
mvfp_max = 255, /* max absolute value of a full pixel MV component */
MVfpvals = (2 * mvfp_max) + 1, /* # possible full pixel MV values */
/* probability offsets for coding each MV component */
mvpis_short = 0, /* short (<= 7) vs long (>= 8) */
MVPsign, /* sign for non-zero */
MVPshort, /* 8 short values = 7-position tree */
MVPbits = MVPshort + mvnum_short - 1, /* mvlong_width long value bits */
MVPcount = MVPbits + mvlong_width /* (with independent probabilities) */
};
typedef struct mv_context {
vp8_prob prob[MVPcount]; /* often come in row, col pairs */
} MV_CONTEXT;
extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2];
enum {
mv_max_hp = 2047, /* max absolute value of a MV component */
MVvals_hp = (2 * mv_max_hp) + 1, /* # possible values "" */
mvlong_width_hp = 11, /* Large MVs have 9 bit magnitudes */
mvnum_short_hp = 16, /* magnitudes 0 through 15 */
mvnum_short_bits_hp = 4, /* number of bits for short mvs */
mvfp_max_hp = 255, /* max absolute value of a full pixel MV component */
MVfpvals_hp = (2 * mvfp_max_hp) + 1, /* # possible full pixel MV values */
/* probability offsets for coding each MV component */
mvpis_short_hp = 0, /* short (<= 7) vs long (>= 8) */
MVPsign_hp, /* sign for non-zero */
MVPshort_hp, /* 8 short values = 7-position tree */
MVPbits_hp = MVPshort_hp + mvnum_short_hp - 1, /* mvlong_width long value bits */
MVPcount_hp = MVPbits_hp + mvlong_width_hp /* (with independent probabilities) */
};
typedef struct mv_context_hp {
vp8_prob prob[MVPcount_hp]; /* often come in row, col pairs */
} MV_CONTEXT_HP;
extern const MV_CONTEXT_HP vp8_mv_update_probs_hp[2], vp8_default_mv_context_hp[2];
extern const vp8_tree_index vp8_small_mvtree[];
extern struct vp8_token_struct vp8_small_mvencodings [8];
extern const vp8_tree_index vp8_small_mvtree_hp[];
extern struct vp8_token_struct vp8_small_mvencodings_hp [16];
#endif /* CONFIG_NEWMVENTROPY */
#endif
......@@ -22,11 +22,7 @@ const unsigned char vp8_mbsplit_offset[4][16] = {
static void lower_mv_precision(int_mv *mv, int usehp)
{
#if CONFIG_NEWMVENTROPY
if (!usehp || !vp8_use_nmv_hp(&mv->as_mv)) {
#else
if (!usehp) {
#endif
if (mv->as_mv.row & 1)
mv->as_mv.row += (mv->as_mv.row > 0 ? -1 : 1);
if (mv->as_mv.col & 1)
......
......@@ -57,15 +57,8 @@ typedef struct frame_contexts {
vp8_prob coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
vp8_prob hybrid_coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
#if CONFIG_NEWMVENTROPY
nmv_context nmvc;
nmv_context pre_nmvc;
#else
MV_CONTEXT mvc[2];
MV_CONTEXT_HP mvc_hp[2];
MV_CONTEXT pre_mvc[2];
MV_CONTEXT_HP pre_mvc_hp[2];
#endif
vp8_prob pre_bmode_prob [VP8_BINTRAMODES - 1];
vp8_prob pre_ymode_prob [VP8_YMODES - 1]; /* interframe intra mode probs */
vp8_prob pre_uv_mode_prob [VP8_YMODES][VP8_UV_MODES - 1];
......@@ -109,12 +102,7 @@ typedef struct frame_contexts {
unsigned int hybrid_coef_counts_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS]
[PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS];
#if CONFIG_NEWMVENTROPY
nmv_context_counts NMVcount;
#else
unsigned int MVcount [2] [MVvals];
unsigned int MVcount_hp [2] [MVvals_hp];
#endif
#if CONFIG_SWITCHABLE_INTERP
vp8_prob switchable_interp_prob[VP8_SWITCHABLE_FILTERS+1]
[VP8_SWITCHABLE_FILTERS-1];
......
......@@ -188,7 +188,6 @@ static void kfread_modes(VP8D_COMP *pbi,
}
}
#if CONFIG_NEWMVENTROPY
static int read_nmv_component(vp8_reader *r,
int rv,
const nmv_component *mvcomp) {
......@@ -207,7 +206,7 @@ static int read_nmv_component(vp8_reader *r,
o = d << 3;
z = vp8_get_mv_mag(c, o);
v = (s ? -(z + 1) : (z + 1));
v = (s ? -(z + 8) : (z + 8));
return v;
}
......@@ -219,6 +218,7 @@ static int read_nmv_component_fp(vp8_reader *r,
int s, z, c, o, d, e, f;
s = v < 0;
z = (s ? -v : v) - 1; /* magnitude - 1 */
z &= ~7;
c = vp8_get_mv_class(z, &o);
d = o >> 3;
......@@ -332,124 +332,6 @@ static void read_nmvprobs(vp8_reader *bc, nmv_context *mvctx,
}
}
#else
static int read_mvcomponent(vp8_reader *r, const MV_CONTEXT *mvc) {
const vp8_prob *const p = (const vp8_prob *) mvc;
int x = 0;
if (vp8_read(r, p [mvpis_short])) { /* Large */
int i = 0;
do {
x += vp8_read(r, p [MVPbits + i]) << i;
} while (++i < mvnum_short_bits);
i = mvlong_width - 1; /* Skip bit 3, which is sometimes implicit */
do {
x += vp8_read(r, p [MVPbits + i]) << i;
} while (--i > mvnum_short_bits);
if (!(x & ~((2 << mvnum_short_bits) - 1)) || vp8_read(r, p [MVPbits + mvnum_short_bits]))
x += (mvnum_short);
} else /* small */
x = vp8_treed_read(r, vp8_small_mvtree, p + MVPshort);
if (x && vp8_read(r, p [MVPsign]))
x = -x;
return x;
}