Go to the documentation of this file.
42 if (
c->bytestream ==
tmp.bytestream &&
c->bytestream >
c->bytestream_start)
43 tmp.low -= *--
tmp.bytestream;
44 tmp.bytestream_end =
tmp.bytestream;
49 if (
c->bytestream_end !=
c->bytestream)
66 for (p = 0; p< 1024; p++) {
94 if (
c.bytestream -
c.bytestream_start - actual_length !=
version) {
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
static int rac_check_termination(RangeCoder *c, int version)
Check if at the current position there is a valid looking termination.
av_cold void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size)
#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.
int ff_rac_terminate(RangeCoder *c, int version)
Terminates the range coder.
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
av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size)
Context structure for the Lagged Fibonacci PRNG.
void ff_build_rac_states(RangeCoder *c, int factor, int max_p)
static int get_rac(RangeCoder *c, uint8_t *const state)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.