FFmpeg
Loading...
Searching...
No Matches
cdtoons.c File Reference

CDToons video decoder. More...

#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/mem.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 av_cold 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 38 of file cdtoons.c.

Referenced by cdtoons_decode_frame().

◆ CDTOONS_MAX_SPRITES

#define CDTOONS_MAX_SPRITES   1200

Definition at line 39 of file cdtoons.c.

Referenced by cdtoons_decode_end(), cdtoons_decode_frame(), and cdtoons_flush().

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 60 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 155 of file cdtoons.c.

◆ cdtoons_decode_init()

static av_cold int cdtoons_decode_init ( AVCodecContext * avctx)
static

Definition at line 410 of file cdtoons.c.

◆ cdtoons_flush()

static av_cold void cdtoons_flush ( AVCodecContext * avctx)
static

Definition at line 423 of file cdtoons.c.

◆ cdtoons_decode_end()

static av_cold int cdtoons_decode_end ( AVCodecContext * avctx)
static

Definition at line 432 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,
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition cdtoons.c:155
static av_cold int cdtoons_decode_init(AVCodecContext *avctx)
Definition cdtoons.c:410
static av_cold void cdtoons_flush(AVCodecContext *avctx)
Definition cdtoons.c:423
static av_cold int cdtoons_decode_end(AVCodecContext *avctx)
Definition cdtoons.c:432
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_CDTOONS
Definition codec_id.h:295
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 446 of file cdtoons.c.