diff options
author | John Koleszar <jkoleszar@google.com> | 2012-11-16 10:48:23 -0800 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2012-12-19 12:52:41 -0800 |
commit | 05ec800ea48f5666e2360d67d2e71faff6c0b992 (patch) | |
tree | b8afe19439d0ac461414bb5e63b1675b3ad16818 /vp9/decoder | |
parent | 4cca47b5385adb8ace28b10db7a20f337b15bbeb (diff) | |
download | libvpx-05ec800ea48f5666e2360d67d2e71faff6c0b992.tar libvpx-05ec800ea48f5666e2360d67d2e71faff6c0b992.tar.gz libvpx-05ec800ea48f5666e2360d67d2e71faff6c0b992.tar.bz2 libvpx-05ec800ea48f5666e2360d67d2e71faff6c0b992.zip |
Use boolcoder API instead of inlining
This patch changes the token packing to call the bool encoder API rather
than inlining it into the token packing function, and similarly removes
a special get_signed case from the detokenizer. This allows easier
experimentation with changing the bool coder as a whole.
Change-Id: I52c3625bbe4960b68cfb873b0e39ade0c82f9e91
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/vp9_detokenize.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c index 8fe218494..55ce0171a 100644 --- a/vp9/decoder/vp9_detokenize.c +++ b/vp9/decoder/vp9_detokenize.c @@ -60,26 +60,7 @@ static const vp9_prob cat6_prob[15] = { DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]); static int get_signed(BOOL_DECODER *br, int value_to_sign) { - const int split = (br->range + 1) >> 1; - const VP9_BD_VALUE bigsplit = (VP9_BD_VALUE)split << (VP9_BD_VALUE_SIZE - 8); - int v; - - if (br->count < 0) - vp9_bool_decoder_fill(br); - - if (br->value < bigsplit) { - br->range = split; - v = value_to_sign; - } else { - br->range = br->range - split; - br->value = br->value - bigsplit; - v = -value_to_sign; - } - br->range += br->range; - br->value += br->value; - --br->count; - - return v; + return decode_bool(br, 128) ? -value_to_sign : value_to_sign; } #define INCREMENT_COUNT(token) \ |