FFmpeg
Data Structures | Functions | Variables
pafvideo.c File Reference
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "copy_block.h"
#include "internal.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, uint8_t *pkt, uint8_t code)
 
static int paf_video_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
 

Variables

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

Function Documentation

◆ paf_video_close()

static av_cold int paf_video_close ( AVCodecContext avctx)
static

Definition at line 65 of file pafvideo.c.

◆ paf_video_init()

static av_cold int paf_video_init ( AVCodecContext avctx)
static

Definition at line 78 of file pafvideo.c.

◆ read4x4block()

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

Definition at line 114 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 124 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 136 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 148 of file pafvideo.c.

Referenced by decode_0().

◆ decode_0()

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

Definition at line 161 of file pafvideo.c.

Referenced by paf_video_decode().

◆ paf_video_decode()

static int paf_video_decode ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket pkt 
)
static

Definition at line 270 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 30 of file pafvideo.c.

Referenced by decode_0().

◆ ff_paf_video_decoder

const AVCodec ff_paf_video_decoder
Initial value:
= {
.name = "paf_video",
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"),
.priv_data_size = sizeof(PAFVideoDecContext),
.close = paf_video_close,
.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 410 of file pafvideo.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
PAFVideoDecContext
Definition: pafvideo.c:49
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
paf_video_init
static av_cold int paf_video_init(AVCodecContext *avctx)
Definition: pafvideo.c:78
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
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: internal.h:50
AV_CODEC_ID_PAF_VIDEO
@ AV_CODEC_ID_PAF_VIDEO
Definition: codec_id.h:229
paf_video_decode
static int paf_video_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: pafvideo.c:270
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:65