Libav
Data Structures | Macros | Functions | Variables
ffv1.h File Reference
#include <stdint.h>
#include "avcodec.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 AC_GOLOMB_RICE   0
 
#define AC_RANGE_DEFAULT_TAB   1
 
#define AC_RANGE_CUSTOM_TAB   2
 
#define MAX_SLICES   256
 

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

◆ MAX_PLANES

#define MAX_PLANES   4

Definition at line 33 of file ffv1.h.

Referenced by encode_rgb_frame(), and ffv1_init_slice_contexts().

◆ CONTEXT_SIZE

#define CONTEXT_SIZE   32

◆ MAX_QUANT_TABLES

#define MAX_QUANT_TABLES   8

Definition at line 36 of file ffv1.h.

Referenced by read_extra_header().

◆ MAX_CONTEXT_INPUTS

#define MAX_CONTEXT_INPUTS   5

Definition at line 37 of file ffv1.h.

◆ AC_GOLOMB_RICE

#define AC_GOLOMB_RICE   0

◆ AC_RANGE_DEFAULT_TAB

#define AC_RANGE_DEFAULT_TAB   1

Definition at line 40 of file ffv1.h.

◆ AC_RANGE_CUSTOM_TAB

#define AC_RANGE_CUSTOM_TAB   2

◆ MAX_SLICES

#define MAX_SLICES   256

Definition at line 67 of file ffv1.h.

Function Documentation

◆ fold()

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

Definition at line 124 of file ffv1.h.

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

◆ predict()

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

Definition at line 137 of file ffv1.h.

◆ get_context()

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

Definition at line 146 of file ffv1.h.

Referenced by decode_line(), and encode_line().

◆ update_vlc_state()

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

Definition at line 168 of file ffv1.h.

Referenced by get_vlc_symbol(), and put_vlc_symbol().

◆ ffv1_common_init()

int ffv1_common_init ( AVCodecContext avctx)

Definition at line 132 of file ffv1.c.

Referenced by ffv1_decode_init(), ffv1_encode_init(), and update_vlc_state().

◆ ffv1_init_slice_state()

int ffv1_init_slice_state ( FFV1Context f,
FFV1Context fs 
)

Definition at line 152 of file ffv1.c.

Referenced by decode_slice(), init_slices_state(), and update_vlc_state().

◆ ffv1_init_slice_contexts()

int ffv1_init_slice_contexts ( FFV1Context f)

Definition at line 186 of file ffv1.c.

Referenced by ffv1_decode_init(), ffv1_encode_init(), and update_vlc_state().

◆ ffv1_allocate_initial_states()

int ffv1_allocate_initial_states ( FFV1Context f)

Definition at line 233 of file ffv1.c.

Referenced by ffv1_encode_init(), read_extra_header(), and update_vlc_state().

◆ ffv1_clear_slice_state()

void ffv1_clear_slice_state ( FFV1Context f,
FFV1Context fs 
)

Definition at line 248 of file ffv1.c.

Referenced by decode_slice(), encode_slice(), and update_vlc_state().

◆ ffv1_close()

int ffv1_close ( AVCodecContext avctx)

Definition at line 275 of file ffv1.c.

Referenced by ffv1_decode_close(), ffv1_encode_close(), and update_vlc_state().

Variable Documentation

◆ ff_log2_run

const uint8_t ff_log2_run[41]

Definition at line 37 of file bitstream.c.

◆ ffv1_quant5_10bit

const int8_t ffv1_quant5_10bit[256]

Definition at line 36 of file ffv1.c.

Referenced by ffv1_encode_init().

◆ ffv1_quant5

const int8_t ffv1_quant5[256]

Definition at line 55 of file ffv1.c.

Referenced by ffv1_encode_init().

◆ ffv1_quant9_10bit

const int8_t ffv1_quant9_10bit[256]

Definition at line 74 of file ffv1.c.

Referenced by ffv1_encode_init().

◆ ffv1_quant11

const int8_t ffv1_quant11[256]

Definition at line 93 of file ffv1.c.

Referenced by ffv1_encode_init().

◆ ffv1_ver2_state

const uint8_t ffv1_ver2_state[256]

Definition at line 112 of file ffv1.c.

Referenced by ffv1_encode_init().