FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
cdxl.c File Reference

Commodore CDXL video decoder. More...

#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

AVCodec ff_cdxl_decoder
 

Detailed Description

Commodore CDXL video decoder.

Author
Paul B Mahol

Definition in file cdxl.c.

Macro Definition Documentation

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 28 of file cdxl.c.

#define BIT_PLANAR   0x00

Definition at line 37 of file cdxl.c.

Referenced by cdxl_decode_frame(), and import_format().

#define CHUNKY   0x20

Definition at line 38 of file cdxl.c.

Referenced by cdxl_decode_frame(), and import_format().

#define BYTE_PLANAR   0x40

Definition at line 39 of file cdxl.c.

#define BIT_LINE   0x80

Definition at line 40 of file cdxl.c.

Referenced by cdxl_decode_frame(), and import_format().

#define BYTE_LINE   0xC0

Definition at line 41 of file cdxl.c.

Function Documentation

static av_cold int cdxl_decode_init ( AVCodecContext avctx)
static

Definition at line 56 of file cdxl.c.

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

Definition at line 66 of file cdxl.c.

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

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

Definition at line 79 of file cdxl.c.

Referenced by import_format().

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

Definition at line 95 of file cdxl.c.

Referenced by import_format().

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

Definition at line 111 of file cdxl.c.

Referenced by import_format().

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

Definition at line 122 of file cdxl.c.

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

static void cdxl_decode_rgb ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 139 of file cdxl.c.

Referenced by cdxl_decode_frame().

static void cdxl_decode_raw ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 148 of file cdxl.c.

Referenced by cdxl_decode_frame().

static void cdxl_decode_ham6 ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 153 of file cdxl.c.

Referenced by cdxl_decode_frame().

static void cdxl_decode_ham8 ( CDXLVideoContext c,
AVFrame frame 
)
static

Definition at line 196 of file cdxl.c.

Referenced by cdxl_decode_frame().

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

Definition at line 239 of file cdxl.c.

static av_cold int cdxl_decode_end ( AVCodecContext avctx)
static

Definition at line 318 of file cdxl.c.

Variable Documentation

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,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
static av_cold int cdxl_decode_end(AVCodecContext *avctx)
Definition: cdxl.c:318
static int cdxl_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: cdxl.c:239
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static av_cold int cdxl_decode_init(AVCodecContext *avctx)
Definition: cdxl.c:56
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:1002

Definition at line 327 of file cdxl.c.