FFmpeg
Data Structures | Typedefs | Functions | Variables
dfa.c File Reference
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Data Structures

struct  DfaContext
 

Typedefs

typedef int(* chunk_decoder) (GetByteContext *gb, uint8_t *frame, int width, int height)
 

Functions

static av_cold int dfa_decode_init (AVCodecContext *avctx)
 
static int decode_copy (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_tsw1 (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_dsw1 (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_dds1 (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_bdlt (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_wdlt (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_tdlt (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int decode_blck (GetByteContext *gb, uint8_t *frame, int width, int height)
 
static int dfa_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int dfa_decode_end (AVCodecContext *avctx)
 

Variables

static const chunk_decoder decoder [8]
 
static const char chunk_name [8][5]
 
const FFCodec ff_dfa_decoder
 

Typedef Documentation

◆ chunk_decoder

typedef int(* chunk_decoder) (GetByteContext *gb, uint8_t *frame, int width, int height)

Definition at line 329 of file dfa.c.

Function Documentation

◆ dfa_decode_init()

static av_cold int dfa_decode_init ( AVCodecContext avctx)
static

Definition at line 39 of file dfa.c.

◆ decode_copy()

static int decode_copy ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 57 of file dfa.c.

◆ decode_tsw1()

static int decode_tsw1 ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 66 of file dfa.c.

◆ decode_dsw1()

static int decode_dsw1 ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 109 of file dfa.c.

◆ decode_dds1()

static int decode_dds1 ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 146 of file dfa.c.

◆ decode_bdlt()

static int decode_bdlt ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 197 of file dfa.c.

◆ decode_wdlt()

static int decode_wdlt ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 239 of file dfa.c.

◆ decode_tdlt()

static int decode_tdlt ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 300 of file dfa.c.

◆ decode_blck()

static int decode_blck ( GetByteContext gb,
uint8_t *  frame,
int  width,
int  height 
)
static

Definition at line 322 of file dfa.c.

◆ dfa_decode_frame()

static int dfa_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 340 of file dfa.c.

◆ dfa_decode_end()

static av_cold int dfa_decode_end ( AVCodecContext avctx)
static

Definition at line 415 of file dfa.c.

Variable Documentation

◆ decoder

const chunk_decoder decoder[8]
static

◆ chunk_name

const char chunk_name[8][5]
static
Initial value:
= {
"COPY", "TSW1", "BDLT", "WDLT", "TDLT", "DSW1", "BLCK", "DDS1"
}

Definition at line 336 of file dfa.c.

Referenced by dfa_decode_frame().

◆ ff_dfa_decoder

const FFCodec ff_dfa_decoder
Initial value:
= {
.p.name = "dfa",
.p.long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_DFA,
.priv_data_size = sizeof(DfaContext),
.close = dfa_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 424 of file dfa.c.

dfa_decode_init
static av_cold int dfa_decode_init(AVCodecContext *avctx)
Definition: dfa.c:39
decode_wdlt
static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:239
init
static int init
Definition: av_tx.c:47
decode_dsw1
static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:109
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:260
decode_tsw1
static int decode_tsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:66
decode_tdlt
static int decode_tdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:300
decode_bdlt
static int decode_bdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:197
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
DfaContext
Definition: dfa.c:34
dfa_decode_frame
static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: dfa.c:340
dfa_decode_end
static av_cold int dfa_decode_end(AVCodecContext *avctx)
Definition: dfa.c:415
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_DFA
@ AV_CODEC_ID_DFA
Definition: codec_id.h:200
decode_blck
static int decode_blck(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:322
decode_dds1
static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:146
decode_copy
static int decode_copy(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:57