FFmpeg
Data Structures | Macros | Functions | Variables
cdtoons.c File Reference
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  CDToonsSprite
 
struct  CDToonsContext
 

Macros

#define CDTOONS_HEADER_SIZE   44
 
#define CDTOONS_MAX_SPRITES   1200
 

Functions

static int cdtoons_render_sprite (AVCodecContext *avctx, const uint8_t *data, uint32_t data_size, int dst_x, int dst_y, int width, int height)
 
static int cdtoons_decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int cdtoons_decode_init (AVCodecContext *avctx)
 
static void cdtoons_flush (AVCodecContext *avctx)
 
static av_cold int cdtoons_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_cdtoons_decoder
 

Detailed Description

CDToons video decoder

Author
Alyssa Milburn amilb.nosp@m.urn@.nosp@m.zall..nosp@m.org

Definition in file cdtoons.c.

Macro Definition Documentation

◆ CDTOONS_HEADER_SIZE

#define CDTOONS_HEADER_SIZE   44

Definition at line 37 of file cdtoons.c.

◆ CDTOONS_MAX_SPRITES

#define CDTOONS_MAX_SPRITES   1200

Definition at line 38 of file cdtoons.c.

Function Documentation

◆ cdtoons_render_sprite()

static int cdtoons_render_sprite ( AVCodecContext avctx,
const uint8_t *  data,
uint32_t  data_size,
int  dst_x,
int  dst_y,
int  width,
int  height 
)
static

Definition at line 59 of file cdtoons.c.

Referenced by cdtoons_decode_frame().

◆ cdtoons_decode_frame()

static int cdtoons_decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 154 of file cdtoons.c.

◆ cdtoons_decode_init()

static av_cold int cdtoons_decode_init ( AVCodecContext avctx)
static

Definition at line 414 of file cdtoons.c.

◆ cdtoons_flush()

static void cdtoons_flush ( AVCodecContext avctx)
static

Definition at line 427 of file cdtoons.c.

◆ cdtoons_decode_end()

static av_cold int cdtoons_decode_end ( AVCodecContext avctx)
static

Definition at line 436 of file cdtoons.c.

Variable Documentation

◆ ff_cdtoons_decoder

const FFCodec ff_cdtoons_decoder
Initial value:
= {
.p.name = "cdtoons",
CODEC_LONG_NAME("CDToons video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(CDToonsContext),
.p.capabilities = AV_CODEC_CAP_DR1,
.flush = cdtoons_flush,
}

Definition at line 450 of file cdtoons.c.

AV_CODEC_ID_CDTOONS
@ AV_CODEC_ID_CDTOONS
Definition: codec_id.h:300
cdtoons_decode_end
static av_cold int cdtoons_decode_end(AVCodecContext *avctx)
Definition: cdtoons.c:436
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
cdtoons_decode_frame
static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: cdtoons.c:154
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
cdtoons_flush
static void cdtoons_flush(AVCodecContext *avctx)
Definition: cdtoons.c:427
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
CDToonsContext
Definition: cdtoons.c:51
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
cdtoons_decode_init
static av_cold int cdtoons_decode_init(AVCodecContext *avctx)
Definition: cdtoons.c:414