Commit 36a9f0c3 authored by Frederic Barbier's avatar Frederic Barbier Committed by Fred BARBIER

Cleanup dead code

Change-Id: Idcc1abaedd6615130fcf1741450fbc5d2f83705c
parent 7bb3a4f0
......@@ -652,49 +652,24 @@ static INLINE uint8_t get_prob(unsigned int num, unsigned int den) {
static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) {
int rate;
const int rate2 = 5;
int i, tmp;
int diff;
#if 1
// static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
// 3, 3, 3, 3, 4 };
// static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 2,
// 2, 2, 2, 3, 3, 3, 3, 3 };
static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2 };
assert(nsymbs < 17);
rate = 3 + (cdf[nsymbs] > 15) + (cdf[nsymbs] > 31) +
nsymbs2speed[nsymbs]; // + get_msb(nsymbs);
tmp = AOM_ICDF(0);
(void)rate2;
(void)diff;
// Single loop (faster)
for (i = 0; i < nsymbs - 1; ++i) {
tmp = (i == val) ? 0 : tmp;
#if 1
if (tmp < cdf[i]) {
cdf[i] -= ((cdf[i] - tmp) >> rate);
} else {
cdf[i] += ((tmp - cdf[i]) >> rate);
}
#else
cdf[i] += ((tmp - cdf[i]) >> rate);
#endif
}
#else
for (i = 0; i < nsymbs; ++i) {
tmp = (i + 1) << rate2;
cdf[i] -= ((cdf[i] - tmp) >> rate);
}
diff = CDF_PROB_TOP - cdf[nsymbs - 1];
for (i = val; i < nsymbs; ++i) {
cdf[i] += diff;
}
#endif
cdf[nsymbs] += (cdf[nsymbs] < 32);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment