23 #ifndef AVCODEC_FFV1_H
24 #define AVCODEC_FFV1_H
31 #include "libavutil/avassert.h"
32 #include "libavutil/crc.h"
33 #include "libavutil/opt.h"
34 #include "libavutil/imgutils.h"
35 #include "libavutil/pixdesc.h"
46 #ifdef __INTEL_COMPILER
52 #define CONTEXT_SIZE 32
54 #define MAX_QUANT_TABLES 8
55 #define MAX_CONTEXT_INPUTS 5
75 #define MAX_SLICES 256
148 diff += 1 << (bits - 1);
149 diff &= (1 <<
bits) - 1;
150 diff -= 1 << (bits - 1);
158 const int LT = last[-1];
159 const int T = last[0];
160 const int L = src[-1];
166 int16_t *last, int16_t *last2)
168 const int LT = last[-1];
169 const int T = last[0];
170 const int RT = last[1];
171 const int L = src[-1];
174 const int TT = last2[0];
175 const int LL = src[-2];
189 int drift = state->
drift;
201 if (drift <= -count) {
202 if (state->
bias > -128)
208 }
else if (drift > 0) {
209 if (state->
bias < 127)
217 state->
drift = drift;
static av_always_inline int fold(int diff, int bits)
int ffv1_allocate_initial_states(FFV1Context *f)
const uint8_t ff_log2_run[41]
This structure describes decoded (raw) audio or video data.
av_cold int ffv1_common_init(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.
av_cold int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
high precision timer, useful to profile code
int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][256]
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
av_cold int ffv1_init_slice_contexts(FFV1Context *f)
int context_count[MAX_QUANT_TABLES]
main external API structure.
void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
Describe the class of an AVClass context structure.
av_cold int ffv1_init_slices_state(FFV1Context *f)
common internal api header.
uint8_t(* state)[CONTEXT_SIZE]
PlaneContext plane[MAX_PLANES]
struct FFV1Context * fsrc
av_cold int ffv1_close(AVCodecContext *avctx)
struct FFV1Context * slice_context[MAX_SLICES]
uint8_t interlace_bit_state[2]