Go to the documentation of this file.
23 #ifndef AVCODEC_FFV1_H
24 #define AVCODEC_FFV1_H
38 #ifdef __INTEL_COMPILER
44 #define CONTEXT_SIZE 32
46 #define MAX_QUANT_TABLES 8
47 #define MAX_QUANT_TABLE_SIZE 256
48 #define MAX_QUANT_TABLE_MASK (MAX_QUANT_TABLE_SIZE - 1)
49 #define MAX_CONTEXT_INPUTS 5
51 #define AC_GOLOMB_RICE 0
52 #define AC_RANGE_DEFAULT_TAB 1
53 #define AC_RANGE_CUSTOM_TAB 2
54 #define AC_RANGE_DEFAULT_TAB_FORCE -2
70 #define MAX_SLICES 1024
198 int drift =
state->drift;
199 int count =
state->count;
206 state->error_sum >>= 1;
210 if (drift <= -count) {
213 drift =
FFMAX(drift + count, -count + 1);
214 }
else if (drift > 0) {
217 drift =
FFMIN(drift - count, 0);
220 state->drift = drift;
221 state->count = count;
static void update_vlc_state(VlcState *const state, const int v)
ProgressFrame last_picture
int context_count[MAX_QUANT_TABLES]
void ff_ffv1_clear_slice_state(const FFV1Context *f, FFV1SliceContext *sc)
This structure describes decoded (raw) audio or video data.
#define MAX_QUANT_TABLE_SIZE
uint8_t(* state)[CONTEXT_SIZE]
int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][MAX_QUANT_TABLE_SIZE]
int ff_ffv1_common_init(AVCodecContext *avctx)
uint64_t(*[MAX_QUANT_TABLES] rc_stat2)[32][2]
static av_always_inline int fold(int diff, int bits)
int ac
1=range coder <-> 0=golomb rice
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Describe the class of an AVClass context structure.
FFV1SliceContext * slices
uint8_t state_transition[256]
PlaneContext * ff_ffv1_planes_alloc(void)
int ff_ffv1_init_slice_state(const FFV1Context *f, FFV1SliceContext *sc)
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
int ff_ffv1_init_slices_state(FFV1Context *f)
int ff_slice_coord(const FFV1Context *f, int width, int sx, int num_h_slices, int chroma_shift)
This is intended for both width and height.
uint8_t(*[MAX_QUANT_TABLES] initial_states)[32]
int ff_ffv1_allocate_initial_states(FFV1Context *f)
int ff_need_new_slices(int width, int num_h_slices, int chroma_shift)
int32_t * sample_buffer32
#define MAX_CONTEXT_INPUTS
int ff_ffv1_close(AVCodecContext *avctx)
uint64_t(*[MAX_QUANT_TABLES] rc_stat2)[32][2]
main external API structure.
static av_const int sign_extend(int val, unsigned bits)
int ff_ffv1_init_slice_contexts(FFV1Context *f)
The ProgressFrame structure.
const AVFrame * cur_enc_frame
int ac_byte_count
number of bytes used for AC coding