FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
anm.c File Reference

Deluxe Paint Animation decoder. More...

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

Go to the source code of this file.

Data Structures

struct  AnmContext
 

Macros

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

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int op (uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
 Perform decode operation. More...
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, 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 (   gb,
  pixel,
  count 
)    op(&dst, dst_end, (gb), (pixel), (count), &s->x, avctx->width, s->frame->linesize[0])

Referenced by decode_frame().

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 38 of file anm.c.

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

Perform decode operation.

Parameters
dstpointer to destination image buffer
dst_endpointer to end of destination image buffer
gbGetByteContext (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 'gb' is set a fill operation is achieved when 'gb' is null and pixel is >= 0 a skip operation is achieved when 'gb' is null and pixel is < 0

Definition at line 78 of file anm.c.

Referenced by cdxl_decode_ham6(), cdxl_decode_ham8(), check_mc(), checkasm_check_h264qpel(), decode_0(), dxv_decompress_dxt1(), dxv_decompress_dxt5(), ff_h264_decode_ref_pic_list_reordering(), filter_slice(), libvorbis_encode_frame(), main(), mxf_read_partition_pack(), oggvorbis_decode_frame(), pulse_flash_stream(), pulse_set_mute(), pulse_set_pause(), pulse_set_volume(), pulse_subscribe_events(), pulse_update_sink_info(), pulse_update_sink_input_info(), and seqvideo_decode().

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

Definition at line 113 of file anm.c.

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 184 of file anm.c.

Variable Documentation

AVCodec ff_anm_decoder
Initial value:
= {
.name = "anm",
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
.priv_data_size = sizeof(AnmContext),
.close = decode_end,
.capabilities = AV_CODEC_CAP_DR1,
}
Definition: anm.c:31
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static av_cold int decode_init(AVCodecContext *avctx)
Definition: anm.c:38
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: anm.c:113
static av_cold int decode_end(AVCodecContext *avctx)
Definition: anm.c:184
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2035
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 192 of file anm.c.