FFmpeg
Data Structures | Functions | Variables
pafvideo.c File Reference
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "copy_block.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  PAFVideoDecContext
 

Functions

static av_cold int paf_video_close (AVCodecContext *avctx)
 
static av_cold int paf_video_init (AVCodecContext *avctx)
 
static void read4x4block (PAFVideoDecContext *c, uint8_t *dst, int width)
 
static void copy_color_mask (uint8_t *dst, int width, uint8_t mask, uint8_t color)
 
static void copy_src_mask (uint8_t *dst, int width, uint8_t mask, const uint8_t *src)
 
static void set_src_position (PAFVideoDecContext *c, const uint8_t **p, const uint8_t **pend)
 
static int decode_0 (PAFVideoDecContext *c, const uint8_t *pkt, uint8_t code)
 
static int paf_video_decode (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *pkt)
 

Variables

static const uint8_t block_sequences [16][8]
 
const FFCodec ff_paf_video_decoder
 

Function Documentation

◆ paf_video_close()

static av_cold int paf_video_close ( AVCodecContext avctx)
static

Definition at line 66 of file pafvideo.c.

◆ paf_video_init()

static av_cold int paf_video_init ( AVCodecContext avctx)
static

Definition at line 79 of file pafvideo.c.

◆ read4x4block()

static void read4x4block ( PAFVideoDecContext c,
uint8_t *  dst,
int  width 
)
static

Definition at line 115 of file pafvideo.c.

Referenced by decode_0().

◆ copy_color_mask()

static void copy_color_mask ( uint8_t *  dst,
int  width,
uint8_t  mask,
uint8_t  color 
)
static

Definition at line 125 of file pafvideo.c.

Referenced by decode_0().

◆ copy_src_mask()

static void copy_src_mask ( uint8_t *  dst,
int  width,
uint8_t  mask,
const uint8_t *  src 
)
static

Definition at line 137 of file pafvideo.c.

Referenced by decode_0().

◆ set_src_position()

static void set_src_position ( PAFVideoDecContext c,
const uint8_t **  p,
const uint8_t **  pend 
)
static

Definition at line 149 of file pafvideo.c.

Referenced by decode_0().

◆ decode_0()

static int decode_0 ( PAFVideoDecContext c,
const uint8_t *  pkt,
uint8_t  code 
)
static

Definition at line 162 of file pafvideo.c.

Referenced by paf_video_decode().

◆ paf_video_decode()

static int paf_video_decode ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket pkt 
)
static

Definition at line 271 of file pafvideo.c.

Variable Documentation

◆ block_sequences

const uint8_t block_sequences[16][8]
static
Initial value:
= {
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, 0, 0, 0, 0, 0, 0, 0 },
{ 5, 7, 0, 0, 0, 0, 0, 0 },
{ 5, 0, 0, 0, 0, 0, 0, 0 },
{ 6, 0, 0, 0, 0, 0, 0, 0 },
{ 5, 7, 5, 7, 0, 0, 0, 0 },
{ 5, 7, 5, 0, 0, 0, 0, 0 },
{ 5, 7, 6, 0, 0, 0, 0, 0 },
{ 5, 5, 0, 0, 0, 0, 0, 0 },
{ 3, 0, 0, 0, 0, 0, 0, 0 },
{ 6, 6, 0, 0, 0, 0, 0, 0 },
{ 2, 4, 0, 0, 0, 0, 0, 0 },
{ 2, 4, 5, 7, 0, 0, 0, 0 },
{ 2, 4, 5, 0, 0, 0, 0, 0 },
{ 2, 4, 6, 0, 0, 0, 0, 0 },
{ 2, 4, 5, 7, 5, 7, 0, 0 },
}

Definition at line 31 of file pafvideo.c.

Referenced by decode_0().

◆ ff_paf_video_decoder

const FFCodec ff_paf_video_decoder
Initial value:
= {
.p.name = "paf_video",
CODEC_LONG_NAME("Amazing Studio Packed Animation File Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(PAFVideoDecContext),
.close = paf_video_close,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 415 of file pafvideo.c.

paf_video_decode
static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *pkt)
Definition: pafvideo.c:271
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
PAFVideoDecContext
Definition: pafvideo.c:50
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
paf_video_init
static av_cold int paf_video_init(AVCodecContext *avctx)
Definition: pafvideo.c:79
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
AV_CODEC_ID_PAF_VIDEO
@ AV_CODEC_ID_PAF_VIDEO
Definition: codec_id.h:231
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
paf_video_close
static av_cold int paf_video_close(AVCodecContext *avctx)
Definition: pafvideo.c:66