diff options
Diffstat (limited to 'vp9/encoder/vp9_tokenize.h')
-rw-r--r-- | vp9/encoder/vp9_tokenize.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/vp9/encoder/vp9_tokenize.h b/vp9/encoder/vp9_tokenize.h index 1caab2ac1..c905715d7 100644 --- a/vp9/encoder/vp9_tokenize.h +++ b/vp9/encoder/vp9_tokenize.h @@ -20,15 +20,14 @@ extern "C" { #endif -#define EOSB_TOKEN 127 // Not signalled, encoder only +#define EOSB_TOKEN 127 // Not signalled, encoder only #if CONFIG_VP9_HIGHBITDEPTH - typedef int32_t EXTRABIT; +typedef int32_t EXTRABIT; #else - typedef int16_t EXTRABIT; +typedef int16_t EXTRABIT; #endif - typedef struct { int16_t token; EXTRABIT extra; @@ -84,19 +83,19 @@ static INLINE int vp9_get_cost(int16_t token, EXTRABIT extrabits, const int *cat6_high_table) { if (token != CATEGORY6_TOKEN) return vp9_extra_bits[token].cost[extrabits >> 1]; - return vp9_cat6_low_cost[(extrabits >> 1) & 0xff] - + cat6_high_table[extrabits >> 9]; + return vp9_cat6_low_cost[(extrabits >> 1) & 0xff] + + cat6_high_table[extrabits >> 9]; } #if CONFIG_VP9_HIGHBITDEPTH -static INLINE const int* vp9_get_high_cost_table(int bit_depth) { +static INLINE const int *vp9_get_high_cost_table(int bit_depth) { return bit_depth == 8 ? vp9_cat6_high_cost - : (bit_depth == 10 ? vp9_cat6_high10_high_cost : - vp9_cat6_high12_high_cost); + : (bit_depth == 10 ? vp9_cat6_high10_high_cost + : vp9_cat6_high12_high_cost); } #else -static INLINE const int* vp9_get_high_cost_table(int bit_depth) { - (void) bit_depth; +static INLINE const int *vp9_get_high_cost_table(int bit_depth) { + (void)bit_depth; return vp9_cat6_high_cost; } #endif // CONFIG_VP9_HIGHBITDEPTH @@ -114,8 +113,7 @@ static INLINE void vp9_get_token_extra(int v, int16_t *token, EXTRABIT *extra) { *extra = vp9_dct_cat_lt_10_value_tokens[v].extra; } static INLINE int16_t vp9_get_token(int v) { - if (v >= CAT6_MIN_VAL || v <= -CAT6_MIN_VAL) - return 10; + if (v >= CAT6_MIN_VAL || v <= -CAT6_MIN_VAL) return 10; return vp9_dct_cat_lt_10_value_tokens[v].token; } |