FFmpeg
Data Structures | Macros | Functions | Variables
anm.c File Reference
#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), &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

const AVCodec ff_anm_decoder
 

Detailed Description

Deluxe Paint Animation decoder

Definition in file anm.c.

Macro Definition Documentation

◆ OP

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

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 36 of file anm.c.

◆ op()

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 75 of file anm.c.

Referenced by add_conv_layer(), add_maximum_layer(), add_pad_layer(), 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(), get_expected(), imx_decode_frame(), libvorbis_encode_frame(), load_native_model(), lzss_uncompress(), mxf_read_partition_pack(), oggvorbis_decode_frame(), pulse_finish_context_operation(), pulse_finish_stream_operation(), pulse_flash_stream(), pulse_set_mute(), pulse_set_pause(), pulse_set_volume(), pulse_subscribe_events(), pulse_update_sink_info(), pulse_update_sink_input_info(), reinit_tables(), seqvideo_decode(), test(), test_broadcast_input0(), test_broadcast_input1(), and test_no_broadcast().

◆ decode_frame()

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

Definition at line 110 of file anm.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 184 of file anm.c.

Variable Documentation

◆ ff_anm_decoder

const 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,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 192 of file anm.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:42
init
static int init
Definition: av_tx.c:47
AnmContext
Definition: anm.c:31
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: anm.c:110
AV_CODEC_ID_ANM
@ AV_CODEC_ID_ANM
Definition: codec_id.h:184
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
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: anm.c:36
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: anm.c:184