23 #ifndef AVCODEC_FFV1_H
24 #define AVCODEC_FFV1_H
44 #ifdef __INTEL_COMPILER
50 #define CONTEXT_SIZE 32
52 #define MAX_QUANT_TABLES 8
53 #define MAX_CONTEXT_INPUTS 5
55 #define AC_GOLOMB_RICE 0
56 #define AC_RANGE_DEFAULT_TAB 1
57 #define AC_RANGE_CUSTOM_TAB 2
58 #define AC_RANGE_DEFAULT_TAB_FORCE -2
76 #define MAX_SLICES 1024
164 int drift =
state->drift;
165 int count =
state->count;
172 state->error_sum >>= 1;
176 if (drift <= -count) {
179 drift =
FFMAX(drift + count, -count + 1);
180 }
else if (drift > 0) {
183 drift =
FFMIN(drift - count, 0);
186 state->drift = drift;
187 state->count = count;
191 #define RENAME(name) name
197 #define RENAME(name) name ## 32
simple assert() macros that are a bit more flexible than ISO C assert().
Libavcodec external API header.
#define fs(width, name, subs,...)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Public header for CRC hash function implementation.
int ff_ffv1_init_slice_contexts(FFV1Context *f)
int ff_ffv1_init_slices_state(FFV1Context *f)
int ff_ffv1_common_init(AVCodecContext *avctx)
static void update_vlc_state(VlcState *const state, const int v)
int ff_need_new_slices(int width, int num_h_slices, int chroma_shift)
int ff_ffv1_allocate_initial_states(FFV1Context *f)
int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
static av_always_inline int fold(int diff, int bits)
void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
int ff_ffv1_close(AVCodecContext *avctx)
#define MAX_CONTEXT_INPUTS
bitstream reader API header.
common internal API header
static av_const int sign_extend(int val, unsigned bits)
Describe the class of an AVClass context structure.
main external API structure.
This structure describes decoded (raw) audio or video data.
int ac
1=range coder <-> 0=golomb rice
int32_t * sample_buffer32
uint64_t(*[MAX_QUANT_TABLES] rc_stat2)[32][2]
struct FFV1Context * fsrc
PlaneContext plane[MAX_PLANES]
int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][256]
struct FFV1Context * slice_context[MAX_SLICES]
int context_count[MAX_QUANT_TABLES]
int ac_byte_count
number of bytes used for AC coding
uint8_t state_transition[256]
int16_t quant_table[MAX_CONTEXT_INPUTS][256]
uint8_t(*[MAX_QUANT_TABLES] initial_states)[32]
int16_t quant_table[MAX_CONTEXT_INPUTS][256]
uint8_t interlace_bit_state[2]
uint8_t(* state)[CONTEXT_SIZE]
static av_always_inline int diff(const uint32_t a, const uint32_t b)