FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
c93.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  C93DecoderContext
 

Macros

#define WIDTH   320
 
#define HEIGHT   192
 
#define C93_HAS_PALETTE   0x01
 
#define C93_FIRST_FRAME   0x02
 

Enumerations

enum  C93BlockType {
  C93_8X8_FROM_PREV = 0x02, C93_4X4_FROM_PREV = 0x06, C93_4X4_FROM_CURR = 0x07, C93_8X8_2COLOR = 0x08,
  C93_4X4_2COLOR = 0x0A, C93_4X4_4COLOR_GRP = 0x0B, C93_4X4_4COLOR = 0x0D, C93_NOOP = 0x0E,
  C93_8X8_INTRA = 0x0F
}
 

Functions

static av_cold int decode_end (AVCodecContext *avctx)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static int copy_block (AVCodecContext *avctx, uint8_t *to, uint8_t *from, int offset, int height, int stride)
 
static void draw_n_color (uint8_t *out, int stride, int width, int height, int bpp, uint8_t cols[4], uint8_t grps[4], uint32_t col)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 

Variables

const FFCodec ff_c93_decoder
 

Macro Definition Documentation

◆ WIDTH

#define WIDTH   320

Definition at line 44 of file c93.c.

◆ HEIGHT

#define HEIGHT   192

Definition at line 45 of file c93.c.

◆ C93_HAS_PALETTE

#define C93_HAS_PALETTE   0x01

Definition at line 47 of file c93.c.

◆ C93_FIRST_FRAME

#define C93_FIRST_FRAME   0x02

Definition at line 48 of file c93.c.

Enumeration Type Documentation

◆ C93BlockType

Enumerator
C93_8X8_FROM_PREV 
C93_4X4_FROM_PREV 
C93_4X4_FROM_CURR 
C93_8X8_2COLOR 
C93_4X4_2COLOR 
C93_4X4_4COLOR_GRP 
C93_4X4_4COLOR 
C93_NOOP 
C93_8X8_INTRA 

Definition at line 32 of file c93.c.

Function Documentation

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 50 of file c93.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 60 of file c93.c.

◆ copy_block()

static int copy_block ( AVCodecContext avctx,
uint8_t *  to,
uint8_t *  from,
int  offset,
int  height,
int  stride 
)
inlinestatic

Definition at line 73 of file c93.c.

Referenced by decode_frame().

◆ draw_n_color()

static void draw_n_color ( uint8_t *  out,
int  stride,
int  width,
int  height,
int  bpp,
uint8_t  cols[4],
uint8_t  grps[4],
uint32_t  col 
)
inlinestatic

Definition at line 107 of file c93.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 123 of file c93.c.

Variable Documentation

◆ ff_c93_decoder

const FFCodec ff_c93_decoder
Initial value:
= {
.p.name = "c93",
CODEC_LONG_NAME("Interplay C93"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_C93,
.priv_data_size = sizeof(C93DecoderContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 266 of file c93.c.

C93DecoderContext
Definition: c93.c:27
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
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: c93.c:123
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: c93.c:60
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: c93.c:50
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_C93
@ AV_CODEC_ID_C93
Definition: codec_id.h:154
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201