17#define RC_MOVE_REDUCING_BITS 4
18#define RC_BIT_PRICE_SHIFT_BITS 4
19#define RC_PRICE_TABLE_SIZE (RC_BIT_MODEL_TOTAL >> RC_MOVE_REDUCING_BITS)
21#define RC_INFINITY_PRICE (UINT32_C(1) << 30)
29rc_bit_price(
const probability prob,
const uint32_t bit)
53 const uint32_t bit_levels, uint32_t symbol)
59 const uint32_t bit = symbol & 1;
61 price += rc_bit_price(probs[symbol], bit);
62 }
while (symbol != 1);
69rc_bittree_reverse_price(
const probability *
const probs,
70 uint32_t bit_levels, uint32_t symbol)
73 uint32_t model_index = 1;
76 const uint32_t bit = symbol & 1;
78 price += rc_bit_price(probs[model_index], bit);
79 model_index = (model_index << 1) + bit;
80 }
while (--bit_levels != 0);
87rc_direct_price(
const uint32_t bits)
#define UINT32_C(n)
Definition lzma.h:139
#define RC_MOVE_REDUCING_BITS
Definition price.h:17
#define RC_PRICE_TABLE_SIZE
Definition price.h:19
const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE]
Lookup table for the inline functions defined in this file.
Definition price_table.c:5
#define RC_BIT_PRICE_SHIFT_BITS
Definition price.h:18
uint16_t probability
Type of probabilities used with range coder.
Definition range_common.h:69
#define RC_BIT_MODEL_TOTAL
Definition range_common.h:28