Go to the documentation of this file.
30 for(;
c->outstanding_count;
c->outstanding_count--){
36 while(
c->range < 0x100){
40 }
else if(
c->low<0x200){
41 c->outstanding_count++;
60 c->low +=
c->range - RangeLPS;
80 }
else if(
c->low<0x400){
81 c->outstanding_count++;
127 else r[
i] = (
i>>8)&1;
static void put_cabac(CABACContext *c, uint8_t *const state, int bit)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
static int put_cabac_terminate(CABACContext *c, int bit)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static void renorm_cabac_encoder(CABACContext *c)
void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size)
#define bit(string, value)
static void put_cabac_bit(CABACContext *c, int b)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static const uint8_t *const ff_h264_mlps_state
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Context structure for the Lagged Fibonacci PRNG.
static void put_cabac_bypass(CABACContext *c, int bit)
static int av_noinline av_unused get_cabac_noinline(CABACContext *c, uint8_t *const state)
static int av_unused get_cabac_terminate(CABACContext *c)
static const uint8_t *const ff_h264_lps_range
int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size)
#define i(width, name, range_min, range_max)
static int put_bits_count(PutBitContext *s)
static int av_unused get_cabac_bypass(CABACContext *c)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.