FFmpeg
Data Structures | Macros | Functions | Variables
cdxl.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.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, int 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, void *data, int *got_frame, AVPacket *pkt)
 
static av_cold int cdxl_decode_end (AVCodecContext *avctx)
 

Variables

const AVCodec 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 37 of file cdxl.c.

◆ CHUNKY

#define CHUNKY   0x20

Definition at line 38 of file cdxl.c.

◆ BYTE_PLANAR

#define BYTE_PLANAR   0x40

Definition at line 39 of file cdxl.c.

◆ BIT_LINE

#define BIT_LINE   0x80

Definition at line 40 of file cdxl.c.

◆ BYTE_LINE

#define BYTE_LINE   0xC0

Definition at line 41 of file cdxl.c.

Function Documentation

◆ cdxl_decode_init()

static av_cold int cdxl_decode_init ( AVCodecContext avctx)
static

Definition at line 57 of file cdxl.c.

◆ import_palette()

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

Definition at line 67 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 85 of file cdxl.c.

Referenced by import_format().

◆ bitline2chunky()

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

Definition at line 101 of file cdxl.c.

Referenced by import_format().

◆ chunky2chunky()

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

Definition at line 117 of file cdxl.c.

Referenced by import_format().

◆ import_format()

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

Definition at line 128 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 145 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 154 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 159 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 202 of file cdxl.c.

Referenced by cdxl_decode_frame().

◆ cdxl_decode_frame()

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

Definition at line 245 of file cdxl.c.

◆ cdxl_decode_end()

static av_cold int cdxl_decode_end ( AVCodecContext avctx)
static

Definition at line 330 of file cdxl.c.

Variable Documentation

◆ ff_cdxl_decoder

const AVCodec ff_cdxl_decoder
Initial value:
= {
.name = "cdxl",
.long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
.priv_data_size = sizeof(CDXLVideoContext),
.close = cdxl_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 339 of file cdxl.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
cdxl_decode_end
static av_cold int cdxl_decode_end(AVCodecContext *avctx)
Definition: cdxl.c:330
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
CDXLVideoContext
Definition: cdxl.c:43
cdxl_decode_frame
static int cdxl_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: cdxl.c:245
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
cdxl_decode_init
static av_cold int cdxl_decode_init(AVCodecContext *avctx)
Definition: cdxl.c:57
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_CDXL
@ AV_CODEC_ID_CDXL
Definition: codec_id.h:209