From a736bf6bfb66d08848b114344731c4e04ac5066d Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Tue, 27 Oct 2015 10:25:30 -0700 Subject: Shrink probability remap tables. Saves 2288 bytes in vp8+vp9 libvpx.a. Change-Id: Iaa5712e59a9693ed58cea63de63781a96827e44e --- vp10/decoder/dsubexp.c | 2 +- vp10/encoder/subexp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vp10') diff --git a/vp10/decoder/dsubexp.c b/vp10/decoder/dsubexp.c index dbcdb4964..9a57fd8ae 100644 --- a/vp10/decoder/dsubexp.c +++ b/vp10/decoder/dsubexp.c @@ -29,7 +29,7 @@ static int decode_uniform(vpx_reader *r) { } static int inv_remap_prob(int v, int m) { - static int inv_map_table[MAX_PROB] = { + static uint8_t inv_map_table[MAX_PROB] = { 7, 20, 33, 46, 59, 72, 85, 98, 111, 124, 137, 150, 163, 176, 189, 202, 215, 228, 241, 254, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, diff --git a/vp10/encoder/subexp.c b/vp10/encoder/subexp.c index fd0b09b69..0d1f1d629 100644 --- a/vp10/encoder/subexp.c +++ b/vp10/encoder/subexp.c @@ -16,7 +16,7 @@ #define vp10_cost_upd256 ((int)(vp10_cost_one(upd) - vp10_cost_zero(upd))) -static const int update_bits[255] = { +static const uint8_t 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, @@ -46,7 +46,7 @@ static int recenter_nonneg(int v, int m) { static int remap_prob(int v, int m) { int i; - static const int map_table[MAX_PROB - 1] = { + static const uint8_t map_table[MAX_PROB - 1] = { // generated by: // map_table[j] = split_index(j, MAX_PROB - 1, MODULUS_PARAM); 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, -- cgit v1.2.3