MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / put_rac

Function put_rac

libavcodec/rangecoder.h:87–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)
88{
89 int range1 = (c->range * (*state)) >> 8;
90
91 av_assert2(*state);
92 av_assert2(range1 < c->range);
93 av_assert2(range1 > 0);
94 if (!bit) {
95 c->range -= range1;
96 *state = c->zero_state[*state];
97 } else {
98 c->low += c->range - range1;
99 c->range = range1;
100 *state = c->one_state[*state];
101 }
102
103 if (c->range < 0x100)
104 renorm_encoder(c);
105}
106
107static inline void refill(RangeCoder *c)
108{

Callers 15

put_symbolFunction · 0.85
put_symbol2Function · 0.85
encode_q_branchFunction · 0.85
encode_q_branch2Function · 0.85
encode_subband_c0runFunction · 0.85
encode_headerFunction · 0.85
put_symbolFunction · 0.85
put_symbol_inlineFunction · 0.85
write_headerFunction · 0.85
ff_ffv1_write_extradataFunction · 0.85
encode_slice_headerFunction · 0.85
encode_frameFunction · 0.85

Calls 1

renorm_encoderFunction · 0.85

Tested by 1

mainFunction · 0.68