Macros | Functions | Variables
ffv1dec.c File Reference

FF Video Codec 1 (a lossless codec) decoder. More...

#include "libavutil/avassert.h"
#include "libavutil/crc.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "rangecoder.h"
#include "golomb.h"
#include "mathops.h"
#include "ffv1.h"
#include "ffv1dec_template.c"

Go to the source code of this file.


#define TYPE   int16_t
#define RENAME(name)   name
#define TYPE   int32_t
#define RENAME(name)   name ## 32


static av_flatten int get_symbol_inline (RangeCoder *c, uint8_t *state, int is_signed)
static av_noinline int get_symbol (RangeCoder *c, uint8_t *state, int is_signed)
static int get_vlc_symbol (GetBitContext *gb, VlcState *const state, int bits)
static int is_input_end (FFV1Context *s)
static int decode_plane (FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index, int pixel_stride)
static int decode_slice_header (FFV1Context *f, FFV1Context *fs)
static int decode_slice (AVCodecContext *c, void *arg)
static int read_quant_table (RangeCoder *c, int16_t *quant_table, int scale)
static int read_quant_tables (RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][256])
static int read_extra_header (FFV1Context *f)
static int read_header (FFV1Context *f)
static av_cold int decode_init (AVCodecContext *avctx)
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static void copy_fields (FFV1Context *fsdst, FFV1Context *fssrc, FFV1Context *fsrc)


AVCodec ff_ffv1_decoder

Detailed Description

FF Video Codec 1 (a lossless codec) decoder.

Definition in file ffv1dec.c.

Macro Definition Documentation

#define TYPE   int16_t

Definition at line 114 of file ffv1dec.c.

#define RENAME (   name)    name

Definition at line 115 of file ffv1dec.c.

#define TYPE   int32_t

Definition at line 114 of file ffv1dec.c.

#define RENAME (   name)    name ## 32

Definition at line 115 of file ffv1dec.c.

Function Documentation

static av_flatten int get_symbol_inline ( RangeCoder c,
uint8_t state,
int  is_signed 

Definition at line 41 of file ffv1dec.c.

Referenced by decode_line_TMPL(), and get_symbol().

static av_noinline int get_symbol ( RangeCoder c,
uint8_t state,
int  is_signed 
static int get_vlc_symbol ( GetBitContext gb,
VlcState *const  state,
int  bits 

Definition at line 70 of file ffv1dec.c.

Referenced by decode_line_TMPL().

static int is_input_end ( FFV1Context s)

Definition at line 95 of file ffv1dec.c.

Referenced by decode_line_TMPL().

static int decode_plane ( FFV1Context s,
uint8_t src,
int  w,
int  h,
int  stride,
int  plane_index,
int  pixel_stride 

Definition at line 118 of file ffv1dec.c.

Referenced by decode_slice().

static int decode_slice_header ( FFV1Context f,
FFV1Context fs 

Definition at line 164 of file ffv1dec.c.

Referenced by decode_slice().

static int decode_slice ( AVCodecContext c,
void arg 

Definition at line 243 of file ffv1dec.c.

Referenced by decode_frame(), and dxtory_decode_v2().

static int read_quant_table ( RangeCoder c,
int16_t *  quant_table,
int  scale 

Definition at line 365 of file ffv1dec.c.

Referenced by read_quant_tables().

static int read_quant_tables ( RangeCoder c,
int16_t  quant_table[MAX_CONTEXT_INPUTS][256] 

Definition at line 392 of file ffv1dec.c.

Referenced by read_extra_header(), and read_header().

static int read_extra_header ( FFV1Context f)

Definition at line 410 of file ffv1dec.c.

Referenced by decode_init().

static int read_header ( FFV1Context f)
static av_cold int decode_init ( AVCodecContext avctx)

Definition at line 815 of file ffv1dec.c.

static int decode_frame ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 

Definition at line 832 of file ffv1dec.c.

static void copy_fields ( FFV1Context fsdst,
FFV1Context fssrc,
FFV1Context fsrc 

Definition at line 982 of file ffv1dec.c.

Variable Documentation

AVCodec ff_ffv1_decoder
Initial value:
= {
.name = "ffv1",
.long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
.priv_data_size = sizeof(FFV1Context),
.close = ff_ffv1_close,
.capabilities = AV_CODEC_CAP_DR1 |
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:49
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: ffv1dec.c:832
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
av_cold int ff_ffv1_close(AVCodecContext *avctx)
Definition: ffv1.c:201
Definition: internal.h:76
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
Codec supports frame-level multithreading.
Definition: codec.h:108
Define a function with only the non-default version specified.
Definition: internal.h:156
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:112
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have update_thread_context() run it in the next thread.Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities.There will be very little speed gain at this point but it should work.If there are inter-frame dependencies
static av_cold int decode_init(AVCodecContext *avctx)
Definition: ffv1dec.c:815
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators...
Definition: codec.h:52

Definition at line 1056 of file ffv1dec.c.