23 #ifndef AVCODEC_FFV1_H
24 #define AVCODEC_FFV1_H
45 #ifdef __INTEL_COMPILER
51 #define CONTEXT_SIZE 32
53 #define MAX_QUANT_TABLES 8
54 #define MAX_CONTEXT_INPUTS 5
72 #define MAX_SLICES 256
146 diff += 1 << (bits - 1);
147 diff = av_mod_uintp2(diff, bits);
148 diff -= 1 << (bits - 1);
156 const int LT = last[-1];
157 const int T = last[0];
158 const int L = src[-1];
164 int16_t *last, int16_t *last2)
166 const int LT = last[-1];
167 const int T = last[0];
168 const int RT = last[1];
169 const int L = src[-1];
172 const int TT = last2[0];
173 const int LL = src[-2];
187 int drift = state->
drift;
199 if (drift <= -count) {
200 if (state->
bias > -128)
206 }
else if (drift > 0) {
207 if (state->
bias < 127)
215 state->
drift = drift;
static av_always_inline int fold(int diff, int bits)
This structure describes decoded (raw) audio or video data.
int ff_ffv1_init_slice_contexts(FFV1Context *f)
int16_t quant_table[MAX_CONTEXT_INPUTS][256]
#define MAX_CONTEXT_INPUTS
uint64_t(*[MAX_QUANT_TABLES] rc_stat2)[32][2]
Multithreading support functions.
uint8_t(*[MAX_QUANT_TABLES] initial_states)[32]
int ff_ffv1_allocate_initial_states(FFV1Context *f)
bitstream reader API header.
high precision timer, useful to profile code
int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][256]
simple assert() macros that are a bit more flexible than ISO C assert().
static int predict(int16_t *src, int16_t *last)
Libavcodec external API header.
int ac
1=range coder <-> 0=golomb rice
int16_t quant_table[MAX_CONTEXT_INPUTS][256]
int ff_ffv1_init_slices_state(FFV1Context *f)
int ff_ffv1_close(AVCodecContext *avctx)
uint8_t state_transition[256]
static int get_context(PlaneContext *p, int16_t *src, int16_t *last, int16_t *last2)
static void update_vlc_state(VlcState *const state, const int v)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
int ac_byte_count
number of bytes used for AC coding
int context_count[MAX_QUANT_TABLES]
main external API structure.
Describe the class of an AVClass context structure.
common internal api header.
uint8_t(* state)[CONTEXT_SIZE]
PlaneContext plane[MAX_PLANES]
int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
static av_always_inline int diff(const uint32_t a, const uint32_t b)
struct FFV1Context * fsrc
struct FFV1Context * slice_context[MAX_SLICES]
uint8_t interlace_bit_state[2]
int ff_ffv1_common_init(AVCodecContext *avctx)
void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)