FFmpeg
Data Structures | Typedefs | Functions | Variables
dfa.c File Reference
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.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, void *data, 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]
 
AVCodec ff_dfa_decoder
 

Typedef Documentation

◆ chunk_decoder

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

Definition at line 328 of file dfa.c.

Function Documentation

◆ dfa_decode_init()

static av_cold int dfa_decode_init ( AVCodecContext avctx)
static

Definition at line 38 of file dfa.c.

◆ decode_copy()

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

Definition at line 56 of file dfa.c.

◆ decode_tsw1()

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

Definition at line 65 of file dfa.c.

◆ decode_dsw1()

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

Definition at line 108 of file dfa.c.

◆ decode_dds1()

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

Definition at line 145 of file dfa.c.

◆ decode_bdlt()

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

Definition at line 196 of file dfa.c.

◆ decode_wdlt()

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

Definition at line 238 of file dfa.c.

◆ decode_tdlt()

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

Definition at line 299 of file dfa.c.

◆ decode_blck()

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

Definition at line 321 of file dfa.c.

◆ dfa_decode_frame()

static int dfa_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 339 of file dfa.c.

◆ dfa_decode_end()

static av_cold int dfa_decode_end ( AVCodecContext avctx)
static

Definition at line 408 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 335 of file dfa.c.

Referenced by dfa_decode_frame().

◆ ff_dfa_decoder

AVCodec ff_dfa_decoder
Initial value:
= {
.name = "dfa",
.long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
.priv_data_size = sizeof(DfaContext),
.close = dfa_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 417 of file dfa.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
dfa_decode_init
static av_cold int dfa_decode_init(AVCodecContext *avctx)
Definition: dfa.c:38
decode_wdlt
static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:238
decode_dsw1
static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:108
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
decode_tsw1
static int decode_tsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:65
dfa_decode_frame
static int dfa_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: dfa.c:339
decode_tdlt
static int decode_tdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:299
decode_bdlt
static int decode_bdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:196
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:33
dfa_decode_end
static av_cold int dfa_decode_end(AVCodecContext *avctx)
Definition: dfa.c:408
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_DFA
@ AV_CODEC_ID_DFA
Definition: codec_id.h:199
decode_blck
static int decode_blck(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:321
decode_dds1
static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:145
decode_copy
static int decode_copy(GetByteContext *gb, uint8_t *frame, int width, int height)
Definition: dfa.c:56