Libav
Data Structures | Macros | Functions | Variables
vmdvideo.c File Reference

Sierra VMD video decoder by Vladimir "VAG" Gneushev (vagsoft at mail.ru) for more information on the Sierra VMD format, visit: http://www.pcisys.net/~melanson/codecs/. More...

#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  VmdVideoContext
 

Macros

#define VMD_HEADER_SIZE   0x330
 
#define PALETTE_COUNT   256
 
#define QUEUE_SIZE   0x1000
 
#define QUEUE_MASK   0x0FFF
 

Functions

static void lz_unpack (const unsigned char *src, int src_len, unsigned char *dest, int dest_len)
 
static int rle_unpack (const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len)
 
static int vmd_decode (VmdVideoContext *s, AVFrame *frame)
 
static av_cold int vmdvideo_decode_end (AVCodecContext *avctx)
 
static av_cold int vmdvideo_decode_init (AVCodecContext *avctx)
 
static int vmdvideo_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

AVCodec ff_vmdvideo_decoder
 

Detailed Description

Sierra VMD video decoder by Vladimir "VAG" Gneushev (vagsoft at mail.ru) for more information on the Sierra VMD format, visit: http://www.pcisys.net/~melanson/codecs/.

The video decoder outputs PAL8 colorspace data. The decoder expects a 0x330-byte VMD file header to be transmitted via extradata during codec initialization. Each encoded frame that is sent to this decoder is expected to be prepended with the appropriate 16-byte frame information record from the VMD file.

Definition in file vmdvideo.c.

Macro Definition Documentation

#define VMD_HEADER_SIZE   0x330

Definition at line 44 of file vmdvideo.c.

Referenced by vmdvideo_decode_init().

#define PALETTE_COUNT   256

Definition at line 45 of file vmdvideo.c.

Referenced by vmd_decode(), vmdvideo_decode_frame(), and vmdvideo_decode_init().

#define QUEUE_SIZE   0x1000

Definition at line 62 of file vmdvideo.c.

Referenced by lz_unpack().

#define QUEUE_MASK   0x0FFF

Definition at line 63 of file vmdvideo.c.

Referenced by lz_unpack().

Function Documentation

static void lz_unpack ( const unsigned char *  src,
int  src_len,
unsigned char *  dest,
int  dest_len 
)
static

Definition at line 65 of file vmdvideo.c.

Referenced by vmd_decode().

static int rle_unpack ( const unsigned char *  src,
unsigned char *  dest,
int  src_count,
int  src_size,
int  dest_len 
)
static

Definition at line 138 of file vmdvideo.c.

Referenced by vmd_decode().

static int vmd_decode ( VmdVideoContext s,
AVFrame frame 
)
static

Definition at line 182 of file vmdvideo.c.

Referenced by vmdvideo_decode_frame().

static av_cold int vmdvideo_decode_end ( AVCodecContext avctx)
static

Definition at line 362 of file vmdvideo.c.

Referenced by vmdvideo_decode_init().

static av_cold int vmdvideo_decode_init ( AVCodecContext avctx)
static

Definition at line 372 of file vmdvideo.c.

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

Definition at line 419 of file vmdvideo.c.

Variable Documentation

AVCodec ff_vmdvideo_decoder
Initial value:
= {
.name = "vmdvideo",
.long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"),
.priv_data_size = sizeof(VmdVideoContext),
.capabilities = CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
static int vmdvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vmdvideo.c:419
static av_cold int vmdvideo_decode_end(AVCodecContext *avctx)
Definition: vmdvideo.c:362
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
Definition: vmdvideo.c:372
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499

Definition at line 457 of file vmdvideo.c.