ffv1.h File Reference
#include <stdint.h>
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
#include "put_bits.h"
#include "rangecoder.h"

Go to the source code of this file.

Data Structures

struct  VlcState
 
struct  PlaneContext
 
struct  FFV1Context
 

Macros

#define MAX_PLANES   4
 
#define CONTEXT_SIZE   32
 
#define MAX_QUANT_TABLES   8
 
#define MAX_CONTEXT_INPUTS   5
 
#define MAX_SLICES   256
 

Typedefs

typedef struct VlcState VlcState
 
typedef struct PlaneContext PlaneContext
 
typedef struct FFV1Context FFV1Context
 

Functions

static av_always_inline int fold (int diff, int bits)
 
static int predict (int16_t *src, int16_t *last)
 
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 ffv1_common_init (AVCodecContext *avctx)
 
int ffv1_init_slice_state (FFV1Context *f, FFV1Context *fs)
 
int ffv1_init_slice_contexts (FFV1Context *f)
 
int ffv1_allocate_initial_states (FFV1Context *f)
 
void ffv1_clear_slice_state (FFV1Context *f, FFV1Context *fs)
 
int ffv1_close (AVCodecContext *avctx)
 

Variables

const uint8_t ff_log2_run [41]
 
const int8_t ffv1_quant5_10bit [256]
 
const int8_t ffv1_quant5 [256]
 
const int8_t ffv1_quant9_10bit [256]
 
const int8_t ffv1_quant11 [256]
 
const uint8_t ffv1_ver2_state [256]
 

Macro Definition Documentation

#define MAX_CONTEXT_INPUTS   5

Definition at line 38 of file ffv1.h.

#define MAX_PLANES   4

Definition at line 34 of file ffv1.h.

Referenced by encode_rgb_frame(), and ffv1_init_slice_contexts().

#define MAX_QUANT_TABLES   8

Definition at line 37 of file ffv1.h.

Referenced by read_extra_header().

#define MAX_SLICES   256

Definition at line 64 of file ffv1.h.

Typedef Documentation

typedef struct FFV1Context FFV1Context
typedef struct PlaneContext PlaneContext
typedef struct VlcState VlcState

Function Documentation

int ffv1_allocate_initial_states ( FFV1Context f)

Definition at line 227 of file ffv1.c.

Referenced by ffv1_encode_init(), and read_extra_header().

void ffv1_clear_slice_state ( FFV1Context f,
FFV1Context fs 
)

Definition at line 242 of file ffv1.c.

Referenced by decode_slice(), and encode_slice().

int ffv1_close ( AVCodecContext avctx)

Definition at line 269 of file ffv1.c.

int ffv1_common_init ( AVCodecContext avctx)

Definition at line 134 of file ffv1.c.

Referenced by ffv1_decode_init(), and ffv1_encode_init().

int ffv1_init_slice_contexts ( FFV1Context f)

Definition at line 192 of file ffv1.c.

Referenced by ffv1_decode_init(), and ffv1_encode_init().

int ffv1_init_slice_state ( FFV1Context f,
FFV1Context fs 
)

Definition at line 158 of file ffv1.c.

Referenced by decode_slice(), and init_slices_state().

static av_always_inline int fold ( int  diff,
int  bits 
)
static

Definition at line 118 of file ffv1.h.

Referenced by encode_line(), get_vlc_symbol(), and put_vlc_symbol().

static int get_context ( PlaneContext p,
int16_t *  src,
int16_t *  last,
int16_t *  last2 
)
inlinestatic

Definition at line 140 of file ffv1.h.

Referenced by decode_line(), and encode_line().

static int predict ( int16_t *  src,
int16_t *  last 
)
inlinestatic

Definition at line 131 of file ffv1.h.

static void update_vlc_state ( VlcState *const  state,
const int  v 
)
inlinestatic

Definition at line 162 of file ffv1.h.

Referenced by get_vlc_symbol(), and put_vlc_symbol().

Variable Documentation

const uint8_t ff_log2_run[41]

Definition at line 36 of file bitstream.c.

const int8_t ffv1_quant11[256]

Definition at line 95 of file ffv1.c.

Referenced by ffv1_encode_init().

const int8_t ffv1_quant5[256]

Definition at line 57 of file ffv1.c.

Referenced by ffv1_encode_init().

const int8_t ffv1_quant5_10bit[256]

Definition at line 38 of file ffv1.c.

Referenced by ffv1_encode_init().

const int8_t ffv1_quant9_10bit[256]

Definition at line 76 of file ffv1.c.

Referenced by ffv1_encode_init().

const uint8_t ffv1_ver2_state[256]

Definition at line 114 of file ffv1.c.

Referenced by ffv1_encode_init().