65 const int64_t one = 1LL << 32;
74 for (i = 0; i < 128; i++) {
75 p8 = (256 * p + one / 2) >> 32;
78 if (last_p8 && last_p8 < 256 && p8 <= max_p)
81 p += ((one - p) * factor + one / 2) >> 32;
85 for (i = 256 - max_p; i <= max_p; i++) {
89 p = (i * one + 128) >> 8;
90 p += ((one - p) * factor + one / 2) >> 32;
91 p8 = (256 * p + one / 2) >> 32;
99 for (i = 1; i < 255; i++)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
Macro definitions for various function/variable attributes.
int ff_rac_terminate(RangeCoder *c)
static void renorm_encoder(RangeCoder *c)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
void ff_build_rac_states(RangeCoder *c, int factor, int max_p)
Libavcodec external API header.
av_cold void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size)
av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size)
static const int factor[16]
uint8_t * bytestream_start