anm.c File Reference

Deluxe Paint Animation decoder. More...

#include "avcodec.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  AnmContext
 

Macros

#define OP(buf, pixel, count)   op(&dst, dst_end, (buf), buf_end, (pixel), (count), &s->x, avctx->width, s->frame.linesize[0])
 

Typedefs

typedef struct AnmContext AnmContext
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int op (uint8_t **dst, const uint8_t *dst_end, const uint8_t **buf, const uint8_t *buf_end, int pixel, int count, int *x, int width, int linesize)
 Perform decode operation. More...
 
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_anm_decoder
 

Detailed Description

Deluxe Paint Animation decoder.

Definition in file anm.c.

Macro Definition Documentation

#define OP (   buf,
  pixel,
  count 
)    op(&dst, dst_end, (buf), buf_end, (pixel), (count), &s->x, avctx->width, s->frame.linesize[0])

Referenced by decode_frame().

Typedef Documentation

typedef struct AnmContext AnmContext

Function Documentation

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 180 of file anm.c.

static int decode_frame ( AVCodecContext avctx,
void data,
int *  data_size,
AVPacket avpkt 
)
static

Definition at line 111 of file anm.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 35 of file anm.c.

static int op ( uint8_t **  dst,
const uint8_t *  dst_end,
const uint8_t **  buf,
const uint8_t *  buf_end,
int  pixel,
int  count,
int *  x,
int  width,
int  linesize 
)
inlinestatic

Perform decode operation.

Parameters
dst,dst_endDestination image buffer
buf,buf_endSource buffer (optional, see below)
pixelFill color (optional, see below)
countPixel count
xPointer to x-axis counter
widthImage width
linesizeDestination image buffer linesize
Returns
non-zero if destination buffer is exhausted

a copy operation is achieved when 'buf' is set a fill operation is acheived when 'buf' is null and pixel is >= 0 a skip operation is acheived when 'buf' is null and pixel is < 0

Definition at line 74 of file anm.c.

Referenced by core_yuv420_rgb(), oggvorbis_encode_frame(), and seqvideo_decode().

Variable Documentation

AVCodec ff_anm_decoder
Initial value:
= {
.name = "anm",
.id = CODEC_ID_ANM,
.priv_data_size = sizeof(AnmContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
}
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
Definition: anm.c:111
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:228
static int init(AVCodecParserContext *s)
Definition: h264_parser.c:336
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:719
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
static av_cold int decode_init(AVCodecContext *avctx)
Definition: anm.c:35
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:327
static av_cold int decode_end(AVCodecContext *avctx)
Definition: anm.c:180
struct AnmContext AnmContext

Definition at line 188 of file anm.c.