64 |
} |
} |
65 |
|
|
66 |
/* reversed mv.length table */ |
/* reversed mv.length table */ |
67 |
static const int r_mvtab[64] = { |
static const int r_mvtab[65] = { |
68 |
12, 12, 12, 12, 12, 12, 12, 12, |
11, 12, 12, 12, 12, 12, 12, 12, 12, |
69 |
12, 12, 12, 12, 12, 12, 12, 12, |
12, 12, 12, 12, 12, 12, 12, 12, |
70 |
12, 12, 12, 12, 12, 12, 12, 12, |
12, 12, 12, 12, 12, 12, 12, 12, |
71 |
12, 12, 12, 12, 12, 12, 12, 12, |
12, 12, 12, 12, 12, 12, 12, 12, |
87 |
bits = (x != 0 ? iFcode:0); |
bits = (x != 0 ? iFcode:0); |
88 |
x = -abs(x); |
x = -abs(x); |
89 |
x >>= (iFcode - 1); |
x >>= (iFcode - 1); |
90 |
bits += r_mvtab[x+63]; |
bits += r_mvtab[x+64]; |
91 |
|
|
92 |
y -= pred.y; |
y -= pred.y; |
93 |
bits += (y != 0 ? iFcode:0); |
bits += (y != 0 ? iFcode:0); |
94 |
y = -abs(y); |
y = -abs(y); |
95 |
y >>= (iFcode - 1); |
y >>= (iFcode - 1); |
96 |
bits += r_mvtab[y+63]; |
bits += r_mvtab[y+64]; |
97 |
|
|
98 |
return bits; |
return bits; |
99 |
} |
} |