FFmpeg
Data Structures | Macros | Functions
ffv1.h File Reference
#include "avcodec.h"
#include "get_bits.h"
#include "mathops.h"
#include "progressframe.h"
#include "put_bits.h"
#include "rangecoder.h"

Go to the source code of this file.

Data Structures

struct  VlcState
 
struct  PlaneContext
 
struct  FFV1SliceContext
 
struct  FFV1Context
 

Macros

#define MAX_PLANES   4
 
#define CONTEXT_SIZE   32
 
#define MAX_QUANT_TABLES   8
 
#define MAX_QUANT_TABLE_SIZE   256
 
#define MAX_QUANT_TABLE_MASK   (MAX_QUANT_TABLE_SIZE - 1)
 
#define MAX_CONTEXT_INPUTS   5
 
#define AC_GOLOMB_RICE   0
 
#define AC_RANGE_DEFAULT_TAB   1
 
#define AC_RANGE_CUSTOM_TAB   2
 
#define AC_RANGE_DEFAULT_TAB_FORCE   -2
 
#define MAX_SLICES   1024
 

Functions

int ff_ffv1_common_init (AVCodecContext *avctx)
 
int ff_ffv1_init_slice_state (const FFV1Context *f, FFV1SliceContext *sc)
 
int ff_ffv1_init_slices_state (FFV1Context *f)
 
int ff_ffv1_init_slice_contexts (FFV1Context *f)
 
PlaneContextff_ffv1_planes_alloc (void)
 
int ff_ffv1_allocate_initial_states (FFV1Context *f)
 
void ff_ffv1_clear_slice_state (const FFV1Context *f, FFV1SliceContext *sc)
 
int ff_ffv1_close (AVCodecContext *avctx)
 
int ff_need_new_slices (int width, int num_h_slices, int chroma_shift)
 
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. More...
 
static av_always_inline int fold (int diff, int bits)
 
static void update_vlc_state (VlcState *const state, const int v)
 

Detailed Description

FF Video Codec 1 (a lossless codec)

Definition in file ffv1.h.

Macro Definition Documentation

◆ MAX_PLANES

#define MAX_PLANES   4

Definition at line 43 of file ffv1.h.

◆ CONTEXT_SIZE

#define CONTEXT_SIZE   32

Definition at line 44 of file ffv1.h.

◆ MAX_QUANT_TABLES

#define MAX_QUANT_TABLES   8

Definition at line 46 of file ffv1.h.

◆ MAX_QUANT_TABLE_SIZE

#define MAX_QUANT_TABLE_SIZE   256

Definition at line 47 of file ffv1.h.

◆ MAX_QUANT_TABLE_MASK

#define MAX_QUANT_TABLE_MASK   (MAX_QUANT_TABLE_SIZE - 1)

Definition at line 48 of file ffv1.h.

◆ MAX_CONTEXT_INPUTS

#define MAX_CONTEXT_INPUTS   5

Definition at line 49 of file ffv1.h.

◆ AC_GOLOMB_RICE

#define AC_GOLOMB_RICE   0

Definition at line 51 of file ffv1.h.

◆ AC_RANGE_DEFAULT_TAB

#define AC_RANGE_DEFAULT_TAB   1

Definition at line 52 of file ffv1.h.

◆ AC_RANGE_CUSTOM_TAB

#define AC_RANGE_CUSTOM_TAB   2

Definition at line 53 of file ffv1.h.

◆ AC_RANGE_DEFAULT_TAB_FORCE

#define AC_RANGE_DEFAULT_TAB_FORCE   -2

Definition at line 54 of file ffv1.h.

◆ MAX_SLICES

#define MAX_SLICES   1024

Definition at line 70 of file ffv1.h.

Function Documentation

◆ ff_ffv1_common_init()

int ff_ffv1_common_init ( AVCodecContext avctx)

Definition at line 36 of file ffv1.c.

Referenced by decode_init(), encode_init_internal(), and vulkan_encode_ffv1_init().

◆ ff_ffv1_init_slice_state()

int ff_ffv1_init_slice_state ( const FFV1Context f,
FFV1SliceContext sc 
)

Definition at line 74 of file ffv1.c.

Referenced by decode_slice(), and ff_ffv1_init_slices_state().

◆ ff_ffv1_init_slices_state()

int ff_ffv1_init_slices_state ( FFV1Context f)

Definition at line 112 of file ffv1.c.

Referenced by encode_init_internal().

◆ ff_ffv1_init_slice_contexts()

int ff_ffv1_init_slice_contexts ( FFV1Context f)

Definition at line 142 of file ffv1.c.

Referenced by decode_init(), and encode_init_internal().

◆ ff_ffv1_planes_alloc()

PlaneContext* ff_ffv1_planes_alloc ( void  )

Definition at line 68 of file ffv1.c.

Referenced by ff_ffv1_init_slice_contexts(), and read_header().

◆ ff_ffv1_allocate_initial_states()

int ff_ffv1_allocate_initial_states ( FFV1Context f)

Definition at line 185 of file ffv1.c.

Referenced by ff_ffv1_encode_init(), and read_extra_header().

◆ ff_ffv1_clear_slice_state()

void ff_ffv1_clear_slice_state ( const FFV1Context f,
FFV1SliceContext sc 
)

Definition at line 200 of file ffv1.c.

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

◆ ff_ffv1_close()

int ff_ffv1_close ( AVCodecContext avctx)

Definition at line 225 of file ffv1.c.

Referenced by ffv1_decode_close().

◆ ff_need_new_slices()

int ff_need_new_slices ( int  width,
int  num_h_slices,
int  chroma_shift 
)

Definition at line 122 of file ffv1.c.

Referenced by encode_determine_slices().

◆ ff_slice_coord()

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.

Definition at line 129 of file ffv1.c.

Referenced by decode_slice_header(), and ff_ffv1_init_slice_contexts().

◆ fold()

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

Definition at line 185 of file ffv1.h.

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

◆ update_vlc_state()

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

Definition at line 196 of file ffv1.h.

Referenced by get_vlc_symbol(), and put_vlc_symbol().