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), &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

◆ OP

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

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 38 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 78 of file anm.c.

Referenced by add_conv_layer(), add_pad_op(), 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(), load_native_model(), main(), 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(), and seqvideo_decode().

◆ decode_frame()

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

Definition at line 113 of file anm.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 187 of file anm.c.

Variable Documentation

◆ ff_anm_decoder

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 195 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:40
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
AnmContext
Definition: anm.c:31
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: anm.c:113
AV_CODEC_ID_ANM
@ AV_CODEC_ID_ANM
Definition: avcodec.h:352
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
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:188
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: anm.c:38
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: anm.c:187