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 "internal.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, void *data, 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 AVCodec 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 36 of file cdtoons.c.

◆ CDTOONS_MAX_SPRITES

#define CDTOONS_MAX_SPRITES   1200

Definition at line 37 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 58 of file cdtoons.c.

Referenced by cdtoons_decode_frame().

◆ cdtoons_decode_frame()

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

Definition at line 153 of file cdtoons.c.

◆ cdtoons_decode_init()

static av_cold int cdtoons_decode_init ( AVCodecContext avctx)
static

Definition at line 409 of file cdtoons.c.

◆ cdtoons_flush()

static void cdtoons_flush ( AVCodecContext avctx)
static

Definition at line 422 of file cdtoons.c.

◆ cdtoons_decode_end()

static av_cold int cdtoons_decode_end ( AVCodecContext avctx)
static

Definition at line 431 of file cdtoons.c.

Variable Documentation

◆ ff_cdtoons_decoder

const AVCodec ff_cdtoons_decoder
Initial value:
= {
.name = "cdtoons",
.long_name = NULL_IF_CONFIG_SMALL("CDToons video"),
.priv_data_size = sizeof(CDToonsContext),
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 445 of file cdtoons.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:41
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
AV_CODEC_ID_CDTOONS
@ AV_CODEC_ID_CDTOONS
Definition: codec_id.h:298
cdtoons_decode_end
static av_cold int cdtoons_decode_end(AVCodecContext *avctx)
Definition: cdtoons.c:431
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:592
cdtoons_flush
static void cdtoons_flush(AVCodecContext *avctx)
Definition: cdtoons.c:422
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
CDToonsContext
Definition: cdtoons.c:50
cdtoons_decode_frame
static int cdtoons_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: cdtoons.c:153
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:409