FFmpeg
Data Structures | Macros | Functions | Variables
anm.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.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, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec 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 37 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 76 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(), objpool_alloc(), objpool_free(), objpool_get(), objpool_release(), 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(), test_no_broadcast(), and thread_start().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 111 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 FFCodec ff_anm_decoder
Initial value:
= {
.p.name = "anm",
CODEC_LONG_NAME("Deluxe Paint Animation"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ANM,
.priv_data_size = sizeof(AnmContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 192 of file anm.c.

init
static int init
Definition: av_tx.c:47
AnmContext
Definition: anm.c:32
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:279
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:264
AV_CODEC_ID_ANM
@ AV_CODEC_ID_ANM
Definition: codec_id.h:186
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
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: anm.c:111
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: anm.c:37
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: anm.c:184