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 cdxl_decode_ham6(), cdxl_decode_ham8(), check_mc(), checkasm_check_h264qpel(), decode_0(), dxv_compress_dxt1(), dxv_decompress_dxt1(), dxv_decompress_dxt5(), ff_h264_decode_ref_pic_list_reordering(), filter_slice(), imx_decode_frame(), libvorbis_encode_frame(), lzss_uncompress(), 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,
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.

AnmContext
Definition: anm.c:32
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
AV_CODEC_ID_ANM
@ AV_CODEC_ID_ANM
Definition: codec_id.h:186
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
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