FFmpeg
Enumerations | Functions | Variables
qdrw.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"

Go to the source code of this file.

Enumerations

enum  QuickdrawOpcodes {
  CLIP = 0x0001, PACKBITSRECT = 0x0098, PACKBITSRGN, DIRECTBITSRECT,
  DIRECTBITSRGN, SHORTCOMMENT = 0x00A0, LONGCOMMENT, EOP = 0x00FF
}
 

Functions

static int parse_palette (AVCodecContext *avctx, GetByteContext *gbc, uint32_t *pal, int colors, int pixmap)
 
static int decode_rle_bpp2 (AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc)
 
static int decode_rle_bpp4 (AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc)
 
static int decode_rle16 (AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc)
 
static int decode_rle (AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc, int step)
 
static int check_header (const char *buf, int buf_size)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

const AVCodec ff_qdraw_decoder
 

Detailed Description

Apple QuickDraw codec. https://developer.apple.com/legacy/library/documentation/mac/QuickDraw/QuickDraw-461.html

Definition in file qdrw.c.

Enumeration Type Documentation

◆ QuickdrawOpcodes

Enumerator
CLIP 
PACKBITSRECT 
PACKBITSRGN 
DIRECTBITSRECT 
DIRECTBITSRGN 
SHORTCOMMENT 
LONGCOMMENT 
EOP 

Definition at line 35 of file qdrw.c.

Function Documentation

◆ parse_palette()

static int parse_palette ( AVCodecContext avctx,
GetByteContext gbc,
uint32_t *  pal,
int  colors,
int  pixmap 
)
static

Definition at line 47 of file qdrw.c.

Referenced by decode_frame().

◆ decode_rle_bpp2()

static int decode_rle_bpp2 ( AVCodecContext avctx,
AVFrame p,
GetByteContext gbc 
)
static

Definition at line 74 of file qdrw.c.

Referenced by decode_frame().

◆ decode_rle_bpp4()

static int decode_rle_bpp4 ( AVCodecContext avctx,
AVFrame p,
GetByteContext gbc 
)
static

Definition at line 129 of file qdrw.c.

Referenced by decode_frame().

◆ decode_rle16()

static int decode_rle16 ( AVCodecContext avctx,
AVFrame p,
GetByteContext gbc 
)
static

Definition at line 173 of file qdrw.c.

Referenced by decode_frame().

◆ decode_rle()

static int decode_rle ( AVCodecContext avctx,
AVFrame p,
GetByteContext gbc,
int  step 
)
static

Definition at line 216 of file qdrw.c.

Referenced by decode_frame().

◆ check_header()

static int check_header ( const char *  buf,
int  buf_size 
)
static

Definition at line 267 of file qdrw.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 290 of file qdrw.c.

Variable Documentation

◆ ff_qdraw_decoder

const AVCodec ff_qdraw_decoder
Initial value:
= {
.name = "qdraw",
.long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 517 of file qdrw.c.

decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: qdrw.c:290
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
AV_CODEC_ID_QDRAW
@ AV_CODEC_ID_QDRAW
Definition: codec_id.h:108
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201