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
145 diff += 1 << (bits - 1);
146 diff = av_mod_uintp2(diff, bits);
147 diff -= 1 << (bits - 1);
155 const int LT = last[-1];
156 const int T = last[0];
157 const int L = src[-1];
163 int16_t *last, int16_t *last2)
165 const int LT = last[-1];
166 const int T = last[0];
167 const int RT = last[1];
168 const int L = src[-1];
171 const int TT = last2[0];
172 const int LL = src[-2];
186 int drift = state->
drift;
198 if (drift <= -count) {
199 if (state->
bias > -128)
205 }
else if (drift > 0) {
206 if (state->
bias < 127)
214 state->
drift = drift;
static av_always_inline int fold(int diff, int bits)
This structure describes decoded (raw) audio or video data.
int ffv1_close(AVCodecContext *avctx)
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]
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]
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)
int ac_byte_count
number of bytes used for AC coding
int ffv1_init_slices_state(FFV1Context *f)
int context_count[MAX_QUANT_TABLES]
void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
main external API structure.
int ffv1_common_init(AVCodecContext *avctx)
int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
Describe the class of an AVClass context structure.
int ffv1_init_slice_contexts(FFV1Context *f)
common internal api header.
uint8_t(* state)[CONTEXT_SIZE]
PlaneContext plane[MAX_PLANES]
static av_always_inline int diff(const uint32_t a, const uint32_t b)
struct FFV1Context * fsrc
int ffv1_allocate_initial_states(FFV1Context *f)
struct FFV1Context * slice_context[MAX_SLICES]
uint8_t interlace_bit_state[2]