| Index: source/libvpx/vp9/encoder/vp9_subexp.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_subexp.c (revision 290053)
|
| +++ source/libvpx/vp9/encoder/vp9_subexp.c (working copy)
|
| @@ -16,7 +16,24 @@
|
|
|
| #define vp9_cost_upd256 ((int)(vp9_cost_one(upd) - vp9_cost_zero(upd)))
|
|
|
| -static int update_bits[255];
|
| +static const int update_bits[255] = {
|
| + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
| + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
| + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
| + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
| + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
| + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
| + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
| + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
| + 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
| + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0,
|
| +};
|
|
|
| static int recenter_nonneg(int v, int m) {
|
| if (v > (m << 1))
|
| @@ -61,18 +78,6 @@
|
| return i;
|
| }
|
|
|
| -static int count_term_subexp(int word) {
|
| - if (word < 16)
|
| - return 5;
|
| - if (word < 32)
|
| - return 6;
|
| - if (word < 64)
|
| - return 8;
|
| - if (word < 129)
|
| - return 10;
|
| - return 11;
|
| -}
|
| -
|
| static int prob_diff_update_cost(vp9_prob newp, vp9_prob oldp) {
|
| int delp = remap_prob(newp, oldp);
|
| return update_bits[delp] * 256;
|
| @@ -111,12 +116,6 @@
|
| encode_term_subexp(w, delp);
|
| }
|
|
|
| -void vp9_compute_update_table() {
|
| - int i;
|
| - for (i = 0; i < 254; i++)
|
| - update_bits[i] = count_term_subexp(i);
|
| -}
|
| -
|
| int vp9_prob_diff_update_savings_search(const unsigned int *ct,
|
| vp9_prob oldp, vp9_prob *bestp,
|
| vp9_prob upd) {
|
|
|