FFmpeg
Data Structures | Macros | Functions | Variables
cdxl.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  CDXLVideoContext
 

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define BIT_PLANAR   0x00
 
#define CHUNKY   0x20
 
#define BYTE_PLANAR   0x40
 
#define BIT_LINE   0x80
 
#define BYTE_LINE   0xC0
 

Functions

static av_cold int cdxl_decode_init (AVCodecContext *avctx)
 
static void import_palette (CDXLVideoContext *c, uint32_t *new_palette)
 
static void bitplanar2chunky (CDXLVideoContext *c, int linesize, uint8_t *out)
 
static void bitline2chunky (CDXLVideoContext *c, int linesize, uint8_t *out)
 
static void chunky2chunky (CDXLVideoContext *c, int linesize, uint8_t *out)
 
static void import_format (CDXLVideoContext *c, ptrdiff_t linesize, uint8_t *out)
 
static void cdxl_decode_rgb (CDXLVideoContext *c, AVFrame *frame)
 
static void cdxl_decode_raw (CDXLVideoContext *c, AVFrame *frame)
 
static void cdxl_decode_ham6 (CDXLVideoContext *c, AVFrame *frame)
 
static void cdxl_decode_ham8 (CDXLVideoContext *c, AVFrame *frame)
 
static int cdxl_decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *pkt)
 
static av_cold int cdxl_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_cdxl_decoder
 

Detailed Description

Commodore CDXL video decoder

Author
Paul B Mahol

Definition in file cdxl.c.

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 28 of file cdxl.c.

◆ BIT_PLANAR

#define BIT_PLANAR   0x00

Definition at line 38 of file cdxl.c.

◆ CHUNKY

#define CHUNKY   0x20

Definition at line 39 of file cdxl.c.

◆ BYTE_PLANAR

#define BYTE_PLANAR   0x40

Definition at line 40 of file cdxl.c.

◆ BIT_LINE

#define BIT_LINE   0x80

Definition at line 41 of file cdxl.c.

◆ BYTE_LINE

#define BYTE_LINE   0xC0

Definition at line 42 of file cdxl.c.

Function Documentation

◆ cdxl_decode_init()

static av_cold int cdxl_decode_init ( AVCodecContext avctx)
static

Definition at line 58 of file cdxl.c.

◆ import_palette()

static void import_palette ( CDXLVideoContext c,
uint32_t *  new_palette 
)
static

Definition at line 68 of file cdxl.c.

Referenced by cdxl_decode_ham6(), cdxl_decode_ham8(), and cdxl_decode_rgb().

◆ bitplanar2chunky()

static void bitplanar2chunky ( CDXLVideoContext c,
int  linesize,
uint8_t *  out 
)
static

Definition at line 86 of file cdxl.c.

Referenced by import_format().

◆ bitline2chunky()

static void bitline2chunky ( CDXLVideoContext c,
int  linesize,
uint8_t *  out 
)
static

Definition at line 102 of file cdxl.c.

Referenced by import_format().

◆ chunky2chunky()

static void chunky2chunky ( CDXLVideoContext c,
int  linesize,
uint8_t *  out 
)
static

Definition at line 118 of file cdxl.c.

Referenced by import_format().

◆ import_format()

static void import_format ( CDXLVideoContext c,
ptrdiff_t  linesize,
uint8_t *  out 
)
static

Definition at line 129 of file cdxl.c.

Referenced by cdxl_decode_ham6(), cdxl_decode_ham8(), cdxl_decode_raw(), and cdxl_decode_rgb().

◆ cdxl_decode_rgb()

static void cdxl_decode_rgb ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 147 of file cdxl.c.

Referenced by cdxl_decode_frame().

◆ cdxl_decode_raw()

static void cdxl_decode_raw ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 156 of file cdxl.c.

Referenced by cdxl_decode_frame().

◆ cdxl_decode_ham6()

static void cdxl_decode_ham6 ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 161 of file cdxl.c.

Referenced by cdxl_decode_frame().

◆ cdxl_decode_ham8()

static void cdxl_decode_ham8 ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 204 of file cdxl.c.

Referenced by cdxl_decode_frame().

◆ cdxl_decode_frame()

static int cdxl_decode_frame ( AVCodecContext avctx,
AVFrame p,
int *  got_frame,
AVPacket pkt 
)
static

Definition at line 247 of file cdxl.c.

◆ cdxl_decode_end()

static av_cold int cdxl_decode_end ( AVCodecContext avctx)
static

Definition at line 329 of file cdxl.c.

Variable Documentation

◆ ff_cdxl_decoder

const FFCodec ff_cdxl_decoder
Initial value:
= {
.p.name = "cdxl",
CODEC_LONG_NAME("Commodore CDXL video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(CDXLVideoContext),
.close = cdxl_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 338 of file cdxl.c.

cdxl_decode_end
static av_cold int cdxl_decode_end(AVCodecContext *avctx)
Definition: cdxl.c:329
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
CDXLVideoContext
Definition: cdxl.c:44
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
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
cdxl_decode_init
static av_cold int cdxl_decode_init(AVCodecContext *avctx)
Definition: cdxl.c:58
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
cdxl_decode_frame
static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *pkt)
Definition: cdxl.c:247
AV_CODEC_ID_CDXL
@ AV_CODEC_ID_CDXL
Definition: codec_id.h:213